-
Notifications
You must be signed in to change notification settings - Fork 830
Closed
Labels
BugImpact-High(Internal MS Team use only) Describes an issue with extreme impact on existing code.(Internal MS Team use only) Describes an issue with extreme impact on existing code.
Milestone
Description
The latest F# 4.1 compiler fails to compile either of the following code programs on .NET Core:
[<Struct>]
type Foo = Bar | Baz
[<EntryPoint>]
let main argv =
printfn "Hello World from F#!"
0 // return an integer exit code[<Struct>]
type Foo =
| Bar of int
| Baz of int
[<EntryPoint>]
let main argv =
printfn "Hello World from F#!"
0 // return an integer exit codeWith this error:
FSC : error FS2014: A problem occurred writing the binary '/Users/phillip/scratch/test/obj/Debug/netcoreapp2.0/test.dll': Error in pass2 for type Program, error: Error in pass2 for type Foo, error: duplicate entry '.ctor' in method table [/Users/phillip/scratch/test/test.fsproj]
This is one rel/2.0.0 of the .NET CLI.
--- Old Issue ---
In VS "15" Preview 5, if you have the following:
[<Struct>]
type Shape =
| Circle of radius: float
| Square of side: double
| Rectangle of sides: double*doubleThe following error occurs:
Error in pass2 for type Program, error: Error in pass2 for type Shape, error: duplicate entry '.ctor' in method table
If I remove the Square case , or change it to be of type int, it compiles.
FrankNiemeyer and srayuws
Metadata
Metadata
Assignees
Labels
BugImpact-High(Internal MS Team use only) Describes an issue with extreme impact on existing code.(Internal MS Team use only) Describes an issue with extreme impact on existing code.