diff options
author | bd-912 <bdunahu@colostate.edu> | 2024-04-25 12:58:10 -0600 |
---|---|---|
committer | bd-912 <bdunahu@colostate.edu> | 2024-04-25 12:58:10 -0600 |
commit | c28a1cc9d206bdde41a621b018c01980b3c8a617 (patch) | |
tree | 90e9de370313682558172c8cebac9389b48c0855 /st/ClassInstance.java | |
parent | bd44adf2b180fcc1198d612a8ae0d2a28468088d (diff) |
Rewrote Symbol Table to be more context aware and avoid collisions
Diffstat (limited to 'st/ClassInstance.java')
-rw-r--r-- | st/ClassInstance.java | 6 |
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 |