X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.scl.compiler%2Fsrc%2Forg%2Fsimantics%2Fscl%2Fcompiler%2Felaboration%2Fexpressions%2Flist%2FListGenerator.java;h=67076789e5272368a14e5f386aeb93bf690f4821;hb=d2897ed06374eee4d91ba495c71c47eef370c52e;hp=959e3bf3d5d71afec0f61d5817f201946eb73e00;hpb=6dfe20b0f514b91337fcac4de0267ffd8268be07;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/expressions/list/ListGenerator.java b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/expressions/list/ListGenerator.java index 959e3bf3d..67076789e 100644 --- a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/expressions/list/ListGenerator.java +++ b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/expressions/list/ListGenerator.java @@ -14,9 +14,6 @@ import org.simantics.scl.compiler.types.TMetaVar; import org.simantics.scl.compiler.types.Types; import org.simantics.scl.compiler.types.kinds.Kinds; -import gnu.trove.map.hash.TObjectIntHashMap; -import gnu.trove.set.hash.TIntHashSet; - public class ListGenerator extends ListQualifier { public Expression pattern; public Expression value; @@ -29,14 +26,8 @@ public class ListGenerator extends ListQualifier { @Override public void checkType(TypingContext context) { TMetaVar componentType = Types.metaVar(Kinds.STAR); - value.checkType(context, Types.apply(Types.LIST, componentType)); - pattern.checkTypeAsPattern(context, componentType); - } - - @Override - public void collectVars(TObjectIntHashMap allVars, - TIntHashSet vars) { - value.collectVars(allVars, vars); + value = value.checkType(context, Types.apply(Types.LIST, componentType)); + pattern = pattern.checkTypeAsPattern(context, componentType); } @Override