This is a flash from the past (#1235). When I fixed that issue, I remarked "It still makes me uneasy, but I can't come up with a scenario where it wouldn't work.".
I found a scenario where it doesn't work:
using System;
using System.Runtime.CompilerServices;
Base b = new Derived();
Console.WriteLine(b.GetFoo());
interface IFoo
{
}
class Foo : IFoo
{
}
class Base
{
public virtual IFoo GetFoo() => throw new NotImplementedException();
}
class Derived : Base
{
public override Foo GetFoo() => null;
}
Passing this program through illink produces
Unhandled exception. System.TypeLoadException: Return type in method 'Derived.GetFoo()' on type 'Derived' from assembly 'cons, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' is not compatible with base type method 'Base.GetFoo()'.
at <Program>$.<Main>$(String[] args)