[types] Check the shapeId as part of the object type equals check

This commit is contained in:
Sathya Gunasekaran
2024-02-08 16:19:55 +00:00
parent f0cffef0a2
commit 3c431f9afe
@@ -171,7 +171,11 @@ function polyTypeEquals(tA: Type, tB: Type): boolean {
}
function objectTypeEquals(tA: Type, tB: Type): boolean {
return typeKindCheck(tA, tB, "Object");
if (tA.kind === "Object" && tB.kind == "Object") {
return tA.shapeId === tB.shapeId;
}
return false;
}
function funcTypeEquals(tA: Type, tB: Type): boolean {