aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar OszkarSemerath <oszkar.semerath@gmail.com>2018-10-11 19:21:48 +0200
committerLibravatar OszkarSemerath <oszkar.semerath@gmail.com>2018-10-11 19:21:48 +0200
commita2281d9238933761e0a55c41a6999d542228a97c (patch)
tree0a6e24993a02eeff73ef0e37cae77cc649708621
parentStart application run config (diff)
downloadVIATRA-Generator-a2281d9238933761e0a55c41a6999d542228a97c.tar.gz
VIATRA-Generator-a2281d9238933761e0a55c41a6999d542228a97c.tar.zst
VIATRA-Generator-a2281d9238933761e0a55c41a6999d542228a97c.zip
Update error message for untranslated types in Viatra
-rw-r--r--Framework/hu.bme.mit.inf.dslreasoner.viatra2logic/src/hu/bme/mit/inf/dslreasoner/viatra2logic/Viatra2Logic.xtend9
1 files changed, 8 insertions, 1 deletions
diff --git a/Framework/hu.bme.mit.inf.dslreasoner.viatra2logic/src/hu/bme/mit/inf/dslreasoner/viatra2logic/Viatra2Logic.xtend b/Framework/hu.bme.mit.inf.dslreasoner.viatra2logic/src/hu/bme/mit/inf/dslreasoner/viatra2logic/Viatra2Logic.xtend
index 0821db47..8a0ff3b3 100644
--- a/Framework/hu.bme.mit.inf.dslreasoner.viatra2logic/src/hu/bme/mit/inf/dslreasoner/viatra2logic/Viatra2Logic.xtend
+++ b/Framework/hu.bme.mit.inf.dslreasoner.viatra2logic/src/hu/bme/mit/inf/dslreasoner/viatra2logic/Viatra2Logic.xtend
@@ -296,7 +296,14 @@ class Viatra2Logic {
296 def TypeReference getType(PParameter v, Map<PBody, Map<PVariable, Set<IInputKey>>> types, TracedOutput<LogicProblem, Ecore2Logic_Trace> ecore2LogicTrace) { 296 def TypeReference getType(PParameter v, Map<PBody, Map<PVariable, Set<IInputKey>>> types, TracedOutput<LogicProblem, Ecore2Logic_Trace> ecore2LogicTrace) {
297 // If parameter type is specified then the specified type is used 297 // If parameter type is specified then the specified type is used
298 if(v.declaredUnaryType !== null) { 298 if(v.declaredUnaryType !== null) {
299 return transformTypeReference(v.declaredUnaryType,ecore2LogicTrace) 299 val res = transformTypeReference(v.declaredUnaryType,ecore2LogicTrace)
300 if(res === null) {
301 throw new AssertionError('''
302 Unable to translate declared type «v.declaredUnaryType».
303 ''')
304 } else {
305 return res
306 }
300 } 307 }
301 // Otherwise, calculate the type based on the type of the variable in the bodies 308 // Otherwise, calculate the type based on the type of the variable in the bodies
302 else { 309 else {