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%2FTPred.java;h=c28e62093abb249896adf6689135b1ac787296d2;hp=e8a0469c5d996f428c205c13018fe1e6e009707c;hb=a8758de5bc19e5adb3f618d3038743a164f09912;hpb=12d9af17384d960b75d58c3935d2b7b46d93e87b 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