X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.scl.compiler%2Fsrc%2Forg%2Fsimantics%2Fscl%2Fcompiler%2Ftypes%2FTPred.java;h=c28e62093abb249896adf6689135b1ac787296d2;hb=4bf8562ab7cbb3747f9c5844a07469291d43e905;hp=e8a0469c5d996f428c205c13018fe1e6e009707c;hpb=9a175feb652b2b7bba7afa540831b9076be3c10e;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/types/TPred.java b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/types/TPred.java index e8a0469c5..c28e62093 100644 --- a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/types/TPred.java +++ b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/types/TPred.java @@ -191,6 +191,24 @@ public class TPred extends Type { hash = parameter.hashCode(hash, boundVars); return hash; } + + @Override + public int skeletonHashCode(int hash) { + hash = HashCodeUtils.updateWithPreprocessedValue(hash, PRED_HASH); + hash = typeClass.skeletonHashCode(hash); + for(Type parameter : parameters) + hash = parameter.skeletonHashCode(hash); + return hash; + } + + @Override + public int skeletonHashCode(int hash, TVar[] boundVars) { + hash = HashCodeUtils.updateWithPreprocessedValue(hash, PRED_HASH); + hash = typeClass.skeletonHashCode(hash, boundVars); + for(Type parameter : parameters) + hash = parameter.skeletonHashCode(hash, boundVars); + return hash; + } @Override public boolean equalsCanonical(Type other) { @@ -211,4 +229,12 @@ public class TPred extends Type { public Kind getKind(Environment context) { return Kinds.STAR; } + + @Override + public Type[] skeletonCanonicalChildren() { + Type[] result = new Type[parameters.length]; + for(int i=0;i