Open
Description
FSC : error FS2014: A problem occurred writing the binary 'obj/Debug/net9.0/refint/Sandbox0.dll': Error in pass3 for type Program, error: Error in pass3 for type T, error: Error in GetMethodRefAsMethodDefIdx for mref = ("Program.I.Foo", "T"), error: MethodDefNotFound
Repro steps
[<Interface>]
type I =
static abstract Foo: int inref -> int
type T =
interface I with
static member Foo i = i
let f<'T when 'T :> I>() =
let x = 123
printfn "%d" ('T.Foo &x)
f<T>()
Expected behavior
This should compile fine
Actual behavior
Weird error quoted above
Known workarounds
Replace byref parameters with Span<T>
Related information
dotnet --version
9.0.100
Metadata
Metadata
Assignees
Labels
Type
Projects
Status