-
Notifications
You must be signed in to change notification settings - Fork 851
Labels
Area-Compiler-CodeGenIlxGen, ilwrite and things at the backendIlxGen, ilwrite and things at the backendArea-Diagnosticsmistakes and possible improvements to diagnosticsmistakes and possible improvements to diagnosticsBugImpact-Low(Internal MS Team use only) Describes an issue with limited impact on existing code.(Internal MS Team use only) Describes an issue with limited impact on existing code.
Milestone
Description
Given the following code:
open System
[<DefaultAugmentation(false)>]
type Option<'T> =
| Some of Value: 'T
| None
member x.Value =
match x with
| Some x -> x
| None -> raise (new InvalidOperationException("Option.Value"))
static member None : Option<'T> = None
and 'T option = Option<'T>When compiling or pasted to FSI, produces the following issue:
Error in pass2 for type ..., error: duplicate entry 'get_None' in method table
Removing DefaultAugmentation attribute and static member None resolves the issue.
Interestingly enough, this is roughly how FSharpOption is defined in fslib, it also fails to compile in fsi, but not in product compiler apparently.
If it's a regression, then it's a fairly old one, SharpLab shows it and they use F# 6
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Area-Compiler-CodeGenIlxGen, ilwrite and things at the backendIlxGen, ilwrite and things at the backendArea-Diagnosticsmistakes and possible improvements to diagnosticsmistakes and possible improvements to diagnosticsBugImpact-Low(Internal MS Team use only) Describes an issue with limited impact on existing code.(Internal MS Team use only) Describes an issue with limited impact on existing code.
Type
Projects
Status
New