소스 검색

Fixed Bug in inference of EventRaisingException for events without a type

Andreas Mülder 10 년 전
부모
커밋
698c76d256
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      plugins/org.yakindu.sct.model.stext/src/org/yakindu/sct/model/stext/inferrer/STextTypeInferrer.java

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

@@ -82,7 +82,8 @@ public class STextTypeInferrer extends ExpressionsTypeInferrer {
 	}
 
 	public Object infer(EventRaisingExpression e) {
-		Type type1 = inferTypeDispatch(deresolve(e.getEvent()).getType());
+		Type type1 = deresolve(e.getEvent()).getType();
+		type1 = type1 != null ? type1 : getType(VOID);
 		if (e.getValue() == null) {
 			assertSame(type1, getType(VOID), String.format(MISSING_VALUE, type1));
 			return getType(VOID);