X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.scl.compiler%2Fsrc%2Forg%2Fsimantics%2Fscl%2Fcompiler%2Felaboration%2Fexpressions%2FESimpleLet.java;h=8e73b2392fd3add380c8e656df2eae19777c2211;hp=53984840d65ca851ecceec5a82c63a5e7f633772;hb=9a175feb652b2b7bba7afa540831b9076be3c10e;hpb=0b72d3e4ec886838314ffeba0fa201e32c0aae3e diff --git a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/expressions/ESimpleLet.java b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/expressions/ESimpleLet.java index 53984840d..8e73b2392 100755 --- a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/expressions/ESimpleLet.java +++ b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/expressions/ESimpleLet.java @@ -141,7 +141,7 @@ public class ESimpleLet extends Expression { private void checkBinding(TypingContext context) { if(variable == null) - value = value.inferType(context); + value = value.checkIgnoredType(context); else if(variable.getType() == null) { value = value.inferType(context); variable.setType(value.getType()); @@ -168,6 +168,13 @@ public class ESimpleLet extends Expression { in = in.checkType(context, requiredType); return this; } + + @Override + public Expression checkIgnoredType(TypingContext context) { + checkBinding(context); + in = in.checkIgnoredType(context); + return this; + } @Override public Expression decorate(ExpressionDecorator decorator) {