summaryrefslogtreecommitdiff
path: root/st
diff options
context:
space:
mode:
Diffstat (limited to 'st')
-rw-r--r--st/ClassInstance.java6
-rw-r--r--st/TypeInstance.java19
2 files changed, 5 insertions, 20 deletions
diff --git a/st/ClassInstance.java b/st/ClassInstance.java
index 8394a2c..789571b 100644
--- a/st/ClassInstance.java
+++ b/st/ClassInstance.java
@@ -13,7 +13,11 @@ public class ClassInstance extends AbstractInstance {
this.mtds = new ArrayList<>();
}
- public boolean equals(Object other) {
+ @Override public String toString() {
+ return String.format("%s", this.name);
+ }
+
+ @Override public boolean equals(Object other) {
ClassInstance o;
return (other instanceof ClassInstance &&
((o = (ClassInstance) other).getName() == this.getName()));
diff --git a/st/TypeInstance.java b/st/TypeInstance.java
index e43c5b3..330662c 100644
--- a/st/TypeInstance.java
+++ b/st/TypeInstance.java
@@ -26,25 +26,6 @@ public class TypeInstance extends AbstractInstance {
cls.getSize() : 4;
}
- public boolean sameType(TypeInstance other) {
- /**
- * Given a TypeInstance object other,
- * returns true if other object
- * is the same type as this one.
- *
- * We can say two types are equal, as
- * long as they are not equal on a
- * type error!
- */
-
- return this.type != TypeEnum.ERROR &&
- this.type == other.getType();
- }
-
- public boolean hasChecked() {
- return type != TypeEnum.ERROR;
- }
-
public void addClassInstance(ClassInstance cls) {
this.cls = cls;
}