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
vzarytovskii
changed the title
Compiler does not oproduce an error when one leaves out keyword "static" in an implementation of IWSAM.
Compiler does not produce an error when one leaves out keyword "static" in an implementation of IWSAM.
Nov 14, 2022
moduleStaticAbstractBug =typeIOperation=static abstractmemberExecute:unit->unittypeFaultyOperation()=interface IOperation withmember_.Execute()=()// no errortypeWorkingOperation()=interface IOperation withstatic memberExecute()=()letconsume<'owhen'o:>IOperation>()='o.Execute()letfail()= consume<WorkingOperation>()// 7.0.102 sdk// this is actually a different behavior than the one I've experienced before: build was successful and fail function was called but runtime error "Missing method" occured. I don't know ho to reproduce it now. Basically same as @vzarytovskii described// "obj\Release\net7.0\refint\Bugs.dll": Error in pass3 for type Program, error: Error in pass3 for type StaticAbstractBug, error: Error in pass3 for type FaultyOperation, error: Error in GetMethodRefAsMethodDefIdx for mref = ("Execute", "IOperation"), error: MethodDefNotFound
StaticAbstractBug.fail()
This results in methodmissingexception in runtime.
Should be an easy fix.
The text was updated successfully, but these errors were encountered: