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%2Ftypes%2FTUnion.java;h=9b2449aa706c31a07e510157bfd0ec2127a6214e;hp=c3d88b00d1c826416e2d6af8144db9cddacde6b6;hb=a8758de5bc19e5adb3f618d3038743a164f09912;hpb=12d9af17384d960b75d58c3935d2b7b46d93e87b diff --git a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/types/TUnion.java b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/types/TUnion.java index c3d88b00d..9b2449aa7 100644 --- a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/types/TUnion.java +++ b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/types/TUnion.java @@ -185,6 +185,22 @@ public class TUnion extends Type { return HashCodeUtils.updateWithPreprocessedValue(hash, sum); } + @Override + public int skeletonHashCode(int hash) { + int sum = UNION_HASH; + for(Type effect : effects) + sum += effect.skeletonHashCode(HashCodeUtils.SEED); + return HashCodeUtils.updateWithPreprocessedValue(hash, sum); + } + + @Override + public int skeletonHashCode(int hash, TVar[] boundVars) { + int sum = UNION_HASH; + for(Type effect : effects) + sum += effect.skeletonHashCode(HashCodeUtils.SEED, boundVars); + return HashCodeUtils.updateWithPreprocessedValue(hash, sum); + } + @Override public boolean equalsCanonical(Type other) { if(this == other) @@ -228,4 +244,9 @@ public class TUnion extends Type { public Kind getKind(Environment context) { return Kinds.EFFECT; } + + @Override + public Type[] skeletonCanonicalChildren() { + return EMPTY_ARRAY; + } }