From 5db69446e6e898129c28bea19fbb8bb111c5101c Mon Sep 17 00:00:00 2001 From: bd-912 Date: Fri, 26 Apr 2024 23:07:54 -0600 Subject: Many new tests (probably) proper sub-typing --- heat/TypeBundle.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'heat/TypeBundle.java') 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() { -- cgit v1.2.3