-
Notifications
You must be signed in to change notification settings - Fork 10.5k
IRGen: Empty fields do have an entry in the field offset vector #13904
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IRGen: Empty fields do have an entry in the field offset vector #13904
Conversation
This is an error introduced as the result of a refactoring a while ago and means that we will store dependently typed stored properties at the wrong offset in a generic struct if it has stored properties of empty types before said property. rdar://36384871
@eeckstein Can you review this for swift-4.1-branch? |
@swift-ci Please test |
@swift-ci Please test source compatibility |
The source compat failure in Kitura is the same that is also happening on master ATM here: https://ci.swift.org/job/swift-master-source-compat-suite/1068/artifact/swift-source-compat-suite/FAIL_Kitura_4.0_BuildSwiftPackage.log Not related to this patch. |
Reflection also relies on an accurate field offset vector. Does dump() work on a type with empty fields? |
@eeckstein Ping? |
@slavapestov swift displayed the contents wrong before this patch:
|
Oh wait that is because it was wrongly set. |
@swift-ci Please test source compatibility |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Thanks for fixing this!
This is an error introduced as the result of a refactoring a while ago
and means that we will store dependently typed stored properties at the
wrong offset in a generic struct if it has stored properties of empty
types before said property.
rdar://36384871