You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Area-Compiler-CodeGenIlxGen, ilwrite and things at the backendBugImpact-Low(Internal MS Team use only) Describes an issue with limited impact on existing code.
Create a new test project dotnet new xunit -lang f#
Add the following code:
open System
type DelegateWithOptionalParam = delegate of ?opt:string -> unit
let instanceOfDelegate = DelegateWithOptionalParam(ignore)
let ``Invoke delegate`` () =
instanceOfDelegate.Invoke(opt="")
FSC : error FS2014: A problem occurred writing the binary '/Users/mathieu/src/tmp/fs_compiler_crash/obj/Debug/netcoreapp2.1/fs_compiler_crash.dll': Error in pass3 for type Tests, error: Error in GetMethodRefAsMethodDefIdx for mref = ("Invoke", "DelegateWithOptionalParam"), error: Exception of type 'Microsoft.FSharp.Compiler.AbstractIL.ILBinaryWriter+MethodDefNotFound' was thrown. [/Users/mathieu/src/tmp/fs_compiler_crash/fs_compiler_crash.fsproj]
Known workarounds
This pattern is perhaps not that common, so might not be used that often.
Area-Compiler-CodeGenIlxGen, ilwrite and things at the backendBugImpact-Low(Internal MS Team use only) Describes an issue with limited impact on existing code.
Activity