While fixing #345, I discovered that we had a breaking change. The following code passes the native compiler but fails to compile in Roslyn.
static class S {}
class C
{
static unsafe void M()
{
dynamic d1 = 123;
d1.N<S>(); // The dev11 compiler does not diagnose this
}
static void Main() {}
}
Although the language spec requires a diagnostic here, perhaps Roslyn should also let this pass.
Whichever we do, this should be documented in the compiler spec.