-
Notifications
You must be signed in to change notification settings - Fork 832
Fix anonymous records internal error when nested with overlapping labels #15519
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
Fix anonymous records internal error when nested with overlapping labels #15519
Conversation
psfinaki
left a comment
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.
Nice one
tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/AnonRecd.fs.il.net472.bsl
Outdated
Show resolved
Hide resolved
T-Gro
left a comment
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.
Postponing until we get a clarification/test/.. on how this affects name stability.
The RFC explicitely mentions also here:
This name must never change in future F# compilers
Add a separator in between labels' bytes to prevent later hash collision
751ec73 to
4b4e365
Compare
New property (IlTypeName) needs to be set on creation
I have addressed this now. It's a bit clunky - we use new modified stamps everywhere except for generating type names, where we use the old recipe - just to make sure it does not affect backward compatibility. |
KevinRansom
left a comment
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.
Looks great.
This will fix secondary issue reported here #6411
AnonRecdTypeInfowas concatenating all of the record's sorted labels to create a key for some post inference check. If for two records concatenating their labels gave the same result, then the key was also the same which resulted in some collisions.