]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/types/TCon.java
Merged changes from feature/scl to master.
[simantics/platform.git] / bundles / org.simantics.scl.compiler / src / org / simantics / scl / compiler / types / TCon.java
index 16e0c29eb5b962634cce80b8fe82f904f612461d..675047ae8510a8c583ddcd8a6c3c80bfdee9e7df 100644 (file)
@@ -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<TMetaVar, TMetaVar> 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;
+    }
 }