-
Notifications
You must be signed in to change notification settings - Fork 833
Closed
Labels
Area-Compiler-CheckingType checking, attributes and all aspects of logic checkingType checking, attributes and all aspects of logic checkingBugImpact-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.
Description
We're seeing F# compiler emitting generic properties (which are invalid in the .NET assembly file format).
Repro steps
From Don in dotnet/linker#2281 (comment)
For example this: should be invalid but isn't being ruled out by the F# compiler:
type Thing =
abstract Foo : 'Out with get, setF# Interactive reports an error for this:
> type Thing =
- abstract Foo : 'Out with get, set
- ;;
error FS0192: internal error: want tyvar #0, but only had 0 tyvarsExpected behavior
The code fails to compile.
Actual behavior
The code compiles and produces a property that doesn't work at runtime (CLR will throw BadImageFormatException when trying to use a PropertyInfo for it).
Known workarounds
Don't write such code.
Metadata
Metadata
Assignees
Labels
Area-Compiler-CheckingType checking, attributes and all aspects of logic checkingType checking, attributes and all aspects of logic checkingBugImpact-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
Done