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%2FTCon.java;h=675047ae8510a8c583ddcd8a6c3c80bfdee9e7df;hp=16e0c29eb5b962634cce80b8fe82f904f612461d;hb=a8758de5bc19e5adb3f618d3038743a164f09912;hpb=3303fe4a3b363e88662ac75a4f7e873ddb3ab352 diff --git a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/types/TCon.java b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/types/TCon.java index 16e0c29eb..675047ae8 100644 --- a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/types/TCon.java +++ b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/types/TCon.java @@ -71,11 +71,6 @@ public final class TCon extends Type { return this == obj; } - @Override - public int hashCode() { - return System.identityHashCode(this); - } - @Override public void updateHashCode(TypeHashCodeContext context) { context.append(System.identityHashCode(this)); @@ -103,11 +98,11 @@ public final class TCon extends Type { } public Kind inferKind(Environment context) throws KindUnificationException { - return context.getTypeConstructor(this).kind; + return context.getTypeDescriptor(this).getKind(); } public Kind getKind(Environment context) { - return context.getTypeConstructor(this).kind; + return context.getTypeDescriptor(this).getKind(); } @Override @@ -153,6 +148,11 @@ public final class TCon extends Type { public Type copySkeleton(THashMap metaVarMap) { return this; } + + @Override + public int hashCode() { + return System.identityHashCode(this); + } @Override public int hashCode(int hash) { @@ -164,8 +164,28 @@ public final class TCon extends Type { return HashCodeUtils.update(hash, System.identityHashCode(this)); } + @Override + public int skeletonHashCode() { + return System.identityHashCode(this); + } + + @Override + public int skeletonHashCode(int hash) { + return HashCodeUtils.update(hash, System.identityHashCode(this)); + } + + @Override + public int skeletonHashCode(int hash, TVar[] boundVars) { + return HashCodeUtils.update(hash, System.identityHashCode(this)); + } + @Override public boolean equalsCanonical(Type other) { return this == other; } + + @Override + public Type[] skeletonCanonicalChildren() { + return EMPTY_ARRAY; + } }