The following program should fail to compile (a static type is used as a type argument), but Roslyn does not diagnose the problem during binding and fails in emit with a useless diagnostic.
error CS7038: Failed to emit module 'CSharpSample1'.
using System;
using System.Linq;
using System.Runtime.CompilerServices;
class Program
{
static void Main(string[] args)
{
M(default(C));
}
public static void M<T>(T t)
{
}
}
static class C
{
}