Open
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
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
New