-
Notifications
You must be signed in to change notification settings - Fork 854
Closed
Closed
Copy link
Labels
Area-Compiler-CheckingType checking, attributes and all aspects of logic checkingType checking, attributes and all aspects of logic checkingArea-Compiler-CodeGenIlxGen, ilwrite and things at the backendIlxGen, ilwrite and things at the backendBug
Milestone
Description
It now passes type checking to invoke a static abstract member on the interface type itself, which leads to a System.BadImageFormatException at runtime as the method body is empty.
Repro steps
type IName =
static abstract Name : string
IName.NameExpected behavior
Compiler should emit an error for such nonsensical use of static abstract members.
Actual behavior
An exception System.BadImageFormatException: Bad IL format. is raised.
Known workarounds
Do not write such code.
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-CodeGenIlxGen, ilwrite and things at the backendIlxGen, ilwrite and things at the backendBug
Type
Projects
Status
Done