diff --git a/src/main/java/de/dhbwstuttgart/typeinference/unify/model/hashKeyType.java b/src/main/java/de/dhbwstuttgart/typeinference/unify/model/hashKeyType.java new file mode 100644 index 000000000..dedfcd86d --- /dev/null +++ b/src/main/java/de/dhbwstuttgart/typeinference/unify/model/hashKeyType.java @@ -0,0 +1,25 @@ +package de.dhbwstuttgart.typeinference.unify.model; + +public class hashKeyType { + UnifyType realType; + + hashKeyType(UnifyType realType) { + this.realType= realType; + } + + @Override + public boolean equals(Object obj) { + if (obj instanceof hashKeyType) { + return realType.equals(((hashKeyType)obj).realType); + } + else + { + return false; + } + } + + @Override + public int hashCode() { + return realType.hashCode(); + } +} diff --git a/src/test/resources/bytecode/javFiles/VectorSuper.jav b/src/test/resources/bytecode/javFiles/VectorSuper.jav index f13497831..fbadafb2e 100644 --- a/src/test/resources/bytecode/javFiles/VectorSuper.jav +++ b/src/test/resources/bytecode/javFiles/VectorSuper.jav @@ -4,7 +4,7 @@ import java.lang.Integer; public class VectorSuper { m(x){ - Integer y; + Integer y = 1; x.addElement(y); //return x; }