-
Notifications
You must be signed in to change notification settings - Fork 854
Open
Labels
AI-thinks-issue-fixedArea-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-Medium(Internal MS Team use only) Describes an issue with moderate impact on existing code.(Internal MS Team use only) Describes an issue with moderate impact on existing code.
Milestone
Description
Repro & Behaviour
module rec MyModule
type MyEnum =
| Alpha = 1
| Beta = 2
type MyInter<'TEnum when 'TEnum : enum<int>> = interface end
type MyAlias = MyInter<MyEnum>produces compiler error: (on MyEnum in type MyEnum =)
error FS0073: internal error: no 'value__' field found for enumeration type MyEnum
Expected behaviour: should compile without any errors
Additional info:
- Same behaviour for
namespace recinstead ofmodule rec(repl) - It does compile without
rec(module (repl), namespace (repl)) - It does compile without
enumconstraints (repl) - Same error when used in interface or class inheritance (interface (repl), class (repl))
- It does compile when
MyInter<MyEnum>is used in other places (like type annotation) (repl) - It does compile when Enum & Alias are in different modules (-> not in same
recmodule) (repl)
Known workarounds
- Don't use
recmodule/namespace - Extract Enum or its usage into different module
- Don't use
enumconstraint
Related information
dotnet --version: 7.0.101
(linked examples (Fable repl): whatever FCS versionFable: 4.0.0-theta-008is based on)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
AI-thinks-issue-fixedArea-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-Medium(Internal MS Team use only) Describes an issue with moderate impact on existing code.(Internal MS Team use only) Describes an issue with moderate impact on existing code.
Type
Projects
Status
New