summaryrefslogtreecommitdiff
path: root/st/ClassInstance.java
diff options
context:
space:
mode:
authorbd-912 <bdunahu@colostate.edu>2024-04-25 12:58:10 -0600
committerbd-912 <bdunahu@colostate.edu>2024-04-25 12:58:10 -0600
commitc28a1cc9d206bdde41a621b018c01980b3c8a617 (patch)
tree90e9de370313682558172c8cebac9389b48c0855 /st/ClassInstance.java
parentbd44adf2b180fcc1198d612a8ae0d2a28468088d (diff)
Rewrote Symbol Table to be more context aware and avoid collisions
Diffstat (limited to 'st/ClassInstance.java')
-rw-r--r--st/ClassInstance.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/st/ClassInstance.java b/st/ClassInstance.java
index e93d3bd..8394a2c 100644
--- a/st/ClassInstance.java
+++ b/st/ClassInstance.java
@@ -13,6 +13,12 @@ public class ClassInstance extends AbstractInstance {
this.mtds = new ArrayList<>();
}
+ public boolean equals(Object other) {
+ ClassInstance o;
+ return (other instanceof ClassInstance &&
+ ((o = (ClassInstance) other).getName() == this.getName()));
+ }
+
public ClassInstance getExtend() {
/**
* Returns the parent class, or