Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 348763 - Changing name of flexible record's field not considered structurally different
Summary: Changing name of flexible record's field not considered structurally different
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: EDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-08 11:08 EDT by Justin Spadea CLA
Modified: 2017-02-23 14:17 EST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Justin Spadea CLA 2011-06-08 11:08:26 EDT
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?
Comment 1 Paul Harmon CLA 2012-01-17 14:41:48 EST
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)
Comment 2 Justin Spadea CLA 2012-02-20 13:55:40 EST
Verified.