-
Notifications
You must be signed in to change notification settings - Fork 794
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
Discriminated union .Is* properties causing compile time error #18263
Comments
Hi @p5ych08illy , could you also share a project file for this repro? Is this a standalone repro, or is there additional code in the same file? |
Hi @T-Gro , I attached the project. It contains only the code snippet I provided above. |
Do you by any chance have a I tried a Among others, your file specified a |
I do not have any props or targets file. I can successfully compile the project with If I try I tried a lot of SDK and .NET version and I don't remember where I copied that error message (net6.0) from. |
17.12 had an issue with ref assemblies and generating case testers. You can either update to latest (17.13 probably), or turn off reference assemblies |
I can not test the Preview version (17.13) right now but the |
Hm, that is weird. This should've turned refassemblies emit off completely. |
Compile time error since Visual Studio update: "Error in pass2 for type Foo, error: duplicate entry 'get_IsSZ' in method table."
Repro steps
Create blank F# class library
Expected behavior
The example compiles successfully.
Actual behavior
Compile time error:
"A problem occurred writing the binary 'C:...\FSharpClassLibrary4\FSharpClassLibrary4\obj\Debug\net6.0\FSharpClassLibrary4.dll': Error in pass2 for type FSharpClassLibrary4.Say, error: Error in pass2 for type Foo, error: duplicate entry 'get_IsSZ' in method table"
Known workarounds
Related information
.NET SDK: 9.0.102
Visual Studio: 17.12.4
The text was updated successfully, but these errors were encountered: