summaryrefslogtreecommitdiff
path: root/heat/TypeBundle.java
diff options
context:
space:
mode:
authorbd-912 <bdunahu@colostate.edu>2024-04-26 23:07:54 -0600
committerbd-912 <bdunahu@colostate.edu>2024-04-26 23:09:01 -0600
commit5db69446e6e898129c28bea19fbb8bb111c5101c (patch)
tree73c23d1fa22e529fe25315e19895160eaaf8018f /heat/TypeBundle.java
parentd85af967c1e537a84aa99c4072de1726374b3c39 (diff)
Many new tests (probably) proper sub-typing
Diffstat (limited to 'heat/TypeBundle.java')
-rw-r--r--heat/TypeBundle.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/heat/TypeBundle.java b/heat/TypeBundle.java
index ac00e71..1867e0d 100644
--- a/heat/TypeBundle.java
+++ b/heat/TypeBundle.java
@@ -25,8 +25,12 @@ class TypeBundle {
}
@Override public boolean equals(Object other) {
+ TypeBundle tb;
return (other instanceof TypeBundle) &&
- ((TypeBundle) other).type == this.type;
+ (tb = (TypeBundle) other).type == this.type &&
+ (tb.instance == this.instance ||
+ (tb.instance != null && tb.instance.getExtend() != null &&
+ tb.instance.getExtend().equals(this.instance)));
}
public boolean isClass() {