]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/types/TUnion.java
Merged changes from feature/scl to master.
[simantics/platform.git] / bundles / org.simantics.scl.compiler / src / org / simantics / scl / compiler / types / TUnion.java
index c3d88b00d1c826416e2d6af8144db9cddacde6b6..9b2449aa706c31a07e510157bfd0ec2127a6214e 100644 (file)
@@ -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;
+    }
 }