From 8c517e7f4ae041dc87952b4db999efb591886882 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Pl=C3=BCmicke?= Date: Wed, 16 Jan 2019 10:27:15 +0100 Subject: [PATCH] new file: ../../../main/java/de/dhbwstuttgart/typeinference/unify/model/hashKeyType.java modified: ../../resources/bytecode/javFiles/VectorSuper.jav --- .../unify/model/hashKeyType.java | 25 +++++++++++++++++++ .../bytecode/javFiles/VectorSuper.jav | 2 +- 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 src/main/java/de/dhbwstuttgart/typeinference/unify/model/hashKeyType.java 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 00000000..dedfcd86 --- /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 f1349783..fbadafb2 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; }