]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/expressions/EBind.java
(refs #7571) Fixed incorrect handling of effects in edo
[simantics/platform.git] / bundles / org.simantics.scl.compiler / src / org / simantics / scl / compiler / elaboration / expressions / EBind.java
index 84cc220c1a0222e75def8781fe657eaff1a88aa3..af31cf9c200c5286f8c0737991807c5dfa0344d3 100644 (file)
@@ -79,8 +79,10 @@ public class EBind extends SimplifiableExpression {
         if(edo)
             context.pushEffectUpperBound(location, blockType == BlockType.Monad ? Types.NO_EFFECTS : Types.metaVar(Kinds.EFFECT));
         in = in.checkType(context, requiredType);
-        if(edo)
+        if(edo) {
             effect = context.popEffectUpperBound();
+            context.declareEffect(location, effect);
+        }
         else
             effect = Types.NO_EFFECTS;
         Type inType = in.getType();