Skip to content

No "implementation missing" error for abstract override #7776

Open
@auduchinok

Description

@auduchinok

A simplified repro of what has actually failed at runtime with no errors reported by F# compiler:

namespace CSharpLib{
  public abstract class AbstractClass{
    public abstract override string ToString();}}
open CSharpLib



type T() =
    inherit AbstractClass()



[<EntryPoint>]let hello _ =
    let t = T()
    printfn "Hello %O" t
    0

No errors reported by FCS:

Screenshot 2019-10-28 at 13 14 39

After successful build this code fails at runtime:

"C:\Program Files\dotnet\dotnet.exe"
    
C:/Users/Eugene.Auduchinok/RiderProjects/NewAbstractDefaultMember/NewAbstractDefaultMember/bin/Debug/netcoreapp2.0/NewAbstractDefaultMember.dll
Unhandled Exception: System.TypeLoadException: Method 'ToString' in type 'T' from assembly 'NewAbstractDefaultMember, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' does not have an implementation.
   at NewAbstractDefaultMember.hello(String[] name)

Process finished with exit code -532,462,766.

Metadata

Metadata

Assignees

Labels

Area-Compiler-ImportAndInteropimport of .NET DLLs and interopBugImpact-Low(Internal MS Team use only) Describes an issue with limited impact on existing code.

Type

Projects

Status

New

Relationships

None yet

Development

No branches or pull requests

Issue actions