After failing to get something like the following to compile:
public class Gen where T : System.Array
{
}
with the error
From the Roslyn source code, it looks like a list of hardcoded types:
switch (type.SpecialType)
{
case SpecialType.System_Object:
case SpecialType.System_ValueType:
case SpecialType.System_Enum:
case SpecialType.System_Delegate:
case SpecialType.System_MulticastDelegate:
case SpecialType.System_Array:
// "Constraint cannot be special class '{0}'"
Error(diagnostics, ErrorCode.ERR_SpecialTypeAsBound, syntax, type);
return false;
}
Source: Binder_Constraints.cs IsValidConstraintType
I've found it using a GitHub search: "A constraint cannot be special class"