15 references to ERR_ConvertToStaticClass
Microsoft.CodeAnalysis.CSharp (2)
Binder\Binder_Expressions.cs (1)
2791diagnostics.Add(ErrorCode.ERR_ConvertToStaticClass, syntax.Location, targetType);
Errors\ErrorFacts.cs (1)
1064or ErrorCode.ERR_ConvertToStaticClass
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (2)
Semantics\PatternMatchingTests3.cs (2)
1404Diagnostic(ErrorCode.ERR_ConvertToStaticClass, "(C)(o switch { _ => default })").WithArguments("C").WithLocation(7, 12), 1410Diagnostic(ErrorCode.ERR_ConvertToStaticClass, "(C)(o switch { _ => throw null! })").WithArguments("C").WithLocation(8, 12)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (6)
Semantics\ImplicitObjectCreationTests.cs (1)
525Diagnostic(ErrorCode.ERR_ConvertToStaticClass, "(C)(new())").WithArguments("C").WithLocation(4, 13),
Semantics\NullableReferenceTypesTests.cs (4)
76184Diagnostic(ErrorCode.ERR_ConvertToStaticClass, "(C)x").WithArguments("C").WithLocation(6, 22), 76193Diagnostic(ErrorCode.ERR_ConvertToStaticClass, "(C?)y").WithArguments("C").WithLocation(10, 22) 89947Diagnostic(ErrorCode.ERR_ConvertToStaticClass, "(C)x").WithArguments("C").WithLocation(3, 35), 89953Diagnostic(ErrorCode.ERR_ConvertToStaticClass, "(C?)y").WithArguments("C").WithLocation(4, 36)
Semantics\SemanticErrorTests.cs (1)
11824new ErrorDescription[] { new ErrorDescription { Code = (int)ErrorCode.ERR_ConvertToStaticClass, Line = 12, Column = 34 } });
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (5)
Symbols\SymbolErrorTests.cs (5)
13338Diagnostic(ErrorCode.ERR_ConvertToStaticClass, "(C)o").WithArguments("C"), 13340Diagnostic(ErrorCode.ERR_ConvertToStaticClass, "(C)new object()").WithArguments("C"), 13342Diagnostic(ErrorCode.ERR_ConvertToStaticClass, "(C)null").WithArguments("C"), 13344Diagnostic(ErrorCode.ERR_ConvertToStaticClass, "(C)1").WithArguments("C"), 13346Diagnostic(ErrorCode.ERR_ConvertToStaticClass, "(C)\"a\"").WithArguments("C"));