-
Notifications
You must be signed in to change notification settings - Fork 851
Labels
Area-Compiler-CodeGenIlxGen, ilwrite and things at the backendIlxGen, ilwrite and things at the backendBugImpact-Low(Internal MS Team use only) Describes an issue with limited impact on existing code.(Internal MS Team use only) Describes an issue with limited impact on existing code.
Milestone
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
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Area-Compiler-CodeGenIlxGen, ilwrite and things at the backendIlxGen, ilwrite and things at the backendBugImpact-Low(Internal MS Team use only) Describes an issue with limited impact on existing code.(Internal MS Team use only) Describes an issue with limited impact on existing code.
Type
Projects
Status
New