diff options
Diffstat (limited to 'Framework/hu.bme.mit.inf.dslreasoner.viatra2logic/src/hu')
-rw-r--r-- | Framework/hu.bme.mit.inf.dslreasoner.viatra2logic/src/hu/bme/mit/inf/dslreasoner/viatra2logic/Viatra2Logic.xtend | 9 |
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 { |