-
Notifications
You must be signed in to change notification settings - Fork 832
Closed
Labels
Milestone
Description
This appears to be directly related to #15919. The fix identified by @vzarytovskii and implemented by @gusty works for the scenario below when there is no signature file. When a signature file is added it still triggers the error. The types do not even need to be in the signature file to trigger the error.
Error:
A problem occurred writing the binary 'obj\Debug\net7.0\refint\Foo.dll': Error in pass3 for type Foo, error: Error in pass3 for type CompilerGoesBoom
1, error: Error in GetMethodRefAsMethodDefIdx for mref = ("Foo.IHasStaticAbstractBase<'a>.Boom", "CompilerGoesBoom1"), error: MethodDefNotFound
Scenario identified by @En3Tho:
type IHasStaticAbstractBase<'a> =
static abstract Boom: unit -> 'a
type IHasStaticAbstractChild<'a> =
inherit IHasStaticAbstractBase<'a>
type CompilerGoesBoom<'a>() =
interface IHasStaticAbstractChild<'a> with // this goes boom because inheritance is involved
static member Boom() = Unchecked.defaultof<'a>
type CompilerDoesNotGoBoom<'a>() =
interface IHasStaticAbstractBase<'a> with // this does not go boom, direct base interface
static member Boom() = Unchecked.defaultof<'a>
En3Tho