Explorar o código

Merge pull request #631 from Yakindu/issue_630

Using type hierarchy to validate guard expression (#630).
Thomas Kutz %!s(int64=9) %!d(string=hai) anos
pai
achega
5ffa3b25e1

+ 1 - 1
plugins/org.yakindu.sct.model.stext/src/org/yakindu/sct/model/stext/inferrer/STextTypeInferrer.java

@@ -60,7 +60,7 @@ public class STextTypeInferrer extends ExpressionsTypeInferrer {
 
 	public Object infer(Guard e) {
 		Type type = inferTypeDispatch(e.getExpression());
-		assertSame(type, getType(BOOLEAN), GUARD);
+		assertIsSupertype(type, getType(BOOLEAN), GUARD);
 		return inferTypeDispatch(type);
 	}