-
Notifications
You must be signed in to change notification settings - Fork 790
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 #123 - Union types without sub-classes should be sealed #143
Conversation
👍 |
type X2 = A | B of string | ||
do check "vwllfewlkefw4" (typedefof<X2>.IsSealed) false | ||
type X3 = A | B | C | ||
do check "vwllfewlkefw5" (typedefof<X3>.IsSealed) false |
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.
This returns true
-- is it expected value or behavior that is incorrect?
Can you please update the codegen tests which are now failing? There are a bunch that use DUs which are now out of date. |
@latkin - Ok, will do I found it a bit tricky to update the one micro codegen test I added, because the *.il generated files get deleted by run RunTests.cmd process somewhere. Is there an option to keep these around? That would make it much simpler. |
@dsyme yes this is a pain point. Let me see if there is something simple we could add to make that easier... |
baselines now updated |
These are still failing for me:
Detective work indicates the TopLevelNamespace guys were patched up by hand based on similar fix to TopLevelModule. However namespace guys turn out to need fix in more locations. And I assume it was not realized that there are codegen tests under 'Optimizations'. |
Updated, thanks. BTW if you get a chance could you look at the Perl problem in AppVeyor? https://ci.appveyor.com/project/KevinRansom/visualfsharp-radou/build/0.0.1.18 |
Those "Optimization" codegen tests are still failing, will look at it in the morning :) |
Don't forget the portable stuff in the core\array tests, too ;-) |
Now updated |
This implements the F# Language User Voice feature request to change the F# compiled representations of union types by making union types sealed when their compiled representations have no sub-types.
This is also covered by suggestion #123.
Since this changes compiled forms in FSharp.Core.dll it is a candidate to consider for F# 4.0.