Community
Participate
Working Groups
record foo s string; end Rename s to s1, then when the builder invokes TypeUtils.areStructurallyEquivalent() it returns true but it should be false. 1. It's not checking the field names if "if (isValueType(s1)) {" returns false - it only checks type and nullability. 2. Is this check even correct? "if (isValueType(s1)) {" - shouldn't it be checking if f1.getType() is a value type, and not s1?
This must have been fixed at some point, because this is working now. To answer your second point, it is correct in checking if s1 is a value type. The code is ensuring that the order of the fields in value types (such as records) is structurally significant. The order of fields in reference types (such as ExternalType) are not structurally important. The code checks later on to make sure that a given field has not changed from nullable to non-nullable (or vice vera)
Verified.