-
Notifications
You must be signed in to change notification settings - Fork 854
Open
Labels
Area-Compiler-CheckingType checking, attributes and all aspects of logic checkingType checking, attributes and all aspects of logic checkingArea-Compiler-SRTPbugs in SRTP inference, resolution, witness passing, code genbugs in SRTP inference, resolution, witness passing, code genBugImpact-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
Consider the following code:
type Foo<'t when 't : (static member Zero : 't)> =
| MkFoo of 't
type Bar =
| Nil
| MkBar of Foo<Bar> // Error: The type 'Bar' does not support the operator 'get_Zero'
static member Zero
with get () = Nil
let zeroBar = LanguagePrimitives.GenericZero<Bar> // this compiles fine, so Bar definitely has a legal Zero valueExpected behavior
Should compile with no problems.
Actual behavior
Compiler error: The type 'Bar' does not support the operator 'get_Zero'
Known workarounds
None
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Area-Compiler-CheckingType checking, attributes and all aspects of logic checkingType checking, attributes and all aspects of logic checkingArea-Compiler-SRTPbugs in SRTP inference, resolution, witness passing, code genbugs in SRTP inference, resolution, witness passing, code genBugImpact-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