In Visual Studio 16.7 Preview 2.0, the following invalid code can be compiled.
partial class C
{
public static partial int M();
}
partial class C
{
public static partial void M() { } // void
}
class Program
{
static void Main()
{
_ = C.M(); // throws InvalidProgram
}
}
Originally posted by @ufcpp in #43795 (comment)