You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
internal error: no 'value__' field found for enumeration type when rec module & enum constraint & type alias #14580
Area-Compiler-CheckingType checking, attributes and all aspects of logic checkingArea-Compiler-SRTPbugs in SRTP inference, resolution, witness passing, code genBugImpact-Medium(Internal MS Team use only) Describes an issue with moderate impact on existing code.
I tested this issue against the current F# compiler (net9.0), and the internal error is no longer produced.
Original behavior (reported):
error FS0073: internal error: no 'value__' field found for enumeration type MyEnum
```
**Current behavior** (repro using `enum(int)` constraint syntax):
```
error FS0033: The type 'MyModule.MyInter<_>' expects 1 type argument(s) but is given 0
The compiler no longer crashes with an internal error. Instead, it emits a proper user-facing diagnostic (FS0033) indicating that the type alias is missing a type argument. The core bug — the internal error — appears to be fixed.
Maintainers may want to verify and close this issue if the new behavior (a proper diagnostic instead of an internal error) is considered satisfactory.
error FS0073: internal error: no 'value__' field found for enumeration type MyEnum
Removing module rec (using plain module) compiles successfully. The bug is specific to recursive module definitions where enum constraint checking runs before type representation is established.
Area-Compiler-CheckingType checking, attributes and all aspects of logic checkingArea-Compiler-SRTPbugs in SRTP inference, resolution, witness passing, code genBugImpact-Medium(Internal MS Team use only) Describes an issue with moderate impact on existing code.
Activity
T-Gro commentedon Jan 11, 2023
Confirming the same for F# on .NET:
https://sharplab.io/#v2:EYLgxg9gTgpgtADwGwBYA0AbEAzAzmgExAGoAfAWwgIFcMYACWMegWQE8WraYBYAKH4AXNgAcG7AKIA7auXoBefvXql6AQQwiAFgEMF9AIxKV9AEIxBe+fQBMQ0eLYBJKYJhQAPAHIAKtNn0AO5aMFL0vv5yIPShsh4Alq4AfEn6iW5Q2DpgDKEE/PZirGwa8Tq4+uwuGR6SMuRJQA==
Removing rec keyword also helps there.
Disable `enum` constraint
Disable `enum` constraint (#462)
github-actions commentedon Mar 19, 2026
🤖 This is an automated response from Repo Assist.
I tested this issue against the current F# compiler (net9.0), and the internal error is no longer produced.
Original behavior (reported):
The compiler no longer crashes with an internal error. Instead, it emits a proper user-facing diagnostic (FS0033) indicating that the type alias is missing a type argument. The core bug — the internal error — appears to be fixed.
Maintainers may want to verify and close this issue if the new behavior (a proper diagnostic instead of an internal error) is considered satisfactory.
T-Gro commentedon Mar 24, 2026
Issue persists on latest main (F# 11.0, compiler 15.2.100.0).
Repro:
Current output:
Removing
module rec(using plainmodule) compiles successfully. The bug is specific to recursive module definitions where enum constraint checking runs before type representation is established.Solve enum constraints once the representations of a recursive group …
Run the postponed post-inference checks in signature files (dotnet#14580
Fix enum constraints in recursive groups and improve constraint diagn…
Fix enum constraints in recursive groups and improve constraint diagn…