37 references to ERR_NoNewTyvar
Microsoft.CodeAnalysis.CSharp (2)
Binder\Binder_Expressions.cs (1)
7093
diagnostics.Add(ErrorCode.
ERR_NoNewTyvar
, node.Location, typeParameter);
Errors\ErrorFacts.cs (1)
849
or ErrorCode.
ERR_NoNewTyvar
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (13)
Semantics\CollectionExpressionTests.cs (13)
9130
Diagnostic(ErrorCode.
ERR_NoNewTyvar
, "[]").WithArguments("T").WithLocation(4, 55),
9133
Diagnostic(ErrorCode.
ERR_NoNewTyvar
, "[]").WithArguments("T").WithLocation(5, 62));
9157
Diagnostic(ErrorCode.
ERR_NoNewTyvar
, "[1]").WithArguments("T").WithLocation(8, 45),
9160
Diagnostic(ErrorCode.
ERR_NoNewTyvar
, "[2]").WithArguments("T").WithLocation(9, 52));
28948
Diagnostic(ErrorCode.
ERR_NoNewTyvar
, "[]").WithArguments("T1").WithLocation(6, 71),
28951
Diagnostic(ErrorCode.
ERR_NoNewTyvar
, "[]").WithArguments("T4").WithLocation(9, 78)
29001
Diagnostic(ErrorCode.
ERR_NoNewTyvar
, "[]").WithArguments("T1").WithLocation(5, 61),
29004
Diagnostic(ErrorCode.
ERR_NoNewTyvar
, "[]").WithArguments("T4").WithLocation(8, 68)
29055
Diagnostic(ErrorCode.
ERR_NoNewTyvar
, "[1]").WithArguments("T1").WithLocation(6, 90),
29067
Diagnostic(ErrorCode.
ERR_NoNewTyvar
, "[4]").WithArguments("T4").WithLocation(9, 97),
29116
Diagnostic(ErrorCode.
ERR_NoNewTyvar
, "[1]").WithArguments("T1").WithLocation(5, 77),
29128
Diagnostic(ErrorCode.
ERR_NoNewTyvar
, "[4]").WithArguments("T4").WithLocation(8, 84),
29818
Diagnostic(ErrorCode.
ERR_NoNewTyvar
, @"[""hi"", null]").WithArguments("T").WithLocation(8, 16),
Microsoft.CodeAnalysis.CSharp.IOperation.UnitTests (3)
IOperation\IOperationTests_IObjectCreationExpression.cs (1)
15064
Diagnostic(ErrorCode.
ERR_NoNewTyvar
, "new T2 { }").WithArguments("T2").WithLocation(7, 14)
IOperation\IOperationTests_ITypeParameterObjectCreationTests.cs (2)
125
Diagnostic(ErrorCode.
ERR_NoNewTyvar
, "new T() { 1, b ? 2 : 3 }").WithArguments("T").WithLocation(9, 24)
491
Diagnostic(ErrorCode.
ERR_NoNewTyvar
, "new T() { 1, 2 }").WithArguments("T").WithLocation(9, 14)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (17)
Semantics\ImplicitObjectCreationTests.cs (7)
730
Diagnostic(ErrorCode.
ERR_NoNewTyvar
, "new()").WithArguments("T").WithLocation(10, 20),
733
Diagnostic(ErrorCode.
ERR_NoNewTyvar
, "new()").WithArguments("T").WithLocation(11, 25),
736
Diagnostic(ErrorCode.
ERR_NoNewTyvar
, "new()").WithArguments("TClass").WithLocation(14, 25),
739
Diagnostic(ErrorCode.
ERR_NoNewTyvar
, "new()").WithArguments("TClass").WithLocation(15, 30)
1379
Diagnostic(ErrorCode.
ERR_NoNewTyvar
, "new()").WithArguments("C").WithLocation(10, 16)
4909
Diagnostic(ErrorCode.
ERR_NoNewTyvar
, "new T()").WithArguments("T").WithLocation(7, 18),
4995
Diagnostic(ErrorCode.
ERR_NoNewTyvar
, "new T()").WithArguments("T").WithLocation(7, 18),
Semantics\InheritanceBindingTests.cs (1)
4758
Diagnostic(ErrorCode.
ERR_NoNewTyvar
, "new V()").WithArguments("V").WithLocation(10, 48),
Semantics\NullableReferenceTypesTests.cs (4)
66939
Diagnostic(ErrorCode.
ERR_NoNewTyvar
, "new T2?()").WithArguments("T2").WithLocation(14, 14),
66948
Diagnostic(ErrorCode.
ERR_NoNewTyvar
, "new T2? { }").WithArguments("T2").WithLocation(15, 14),
66981
Diagnostic(ErrorCode.
ERR_NoNewTyvar
, "new T5?()").WithArguments("T5").WithLocation(36, 14),
66987
Diagnostic(ErrorCode.
ERR_NoNewTyvar
, "new T5? { }").WithArguments("T5").WithLocation(37, 14)
Semantics\ObjectAndCollectionInitializerTests.cs (1)
1514
Diagnostic(ErrorCode.
ERR_NoNewTyvar
, "new T() { x = 0 }").WithArguments("T").WithLocation(6, 27)
Semantics\SemanticErrorTests.cs (4)
9775
Diagnostic(ErrorCode.
ERR_NoNewTyvar
, "new T()").WithArguments("T").WithLocation(6, 13),
9777
Diagnostic(ErrorCode.
ERR_NoNewTyvar
, "new V()").WithArguments("V").WithLocation(8, 13),
9779
Diagnostic(ErrorCode.
ERR_NoNewTyvar
, "new U()").WithArguments("U").WithLocation(21, 13));
9807
Diagnostic(ErrorCode.
ERR_NoNewTyvar
, "new U()").WithArguments("U").WithLocation(17, 39));
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (2)
Symbols\GenericConstraintTests.cs (2)
746
Diagnostic(ErrorCode.
ERR_NoNewTyvar
, "new T()").WithArguments("T").WithLocation(8, 11));
1395
Diagnostic(ErrorCode.
ERR_NoNewTyvar
, "new U(G())").WithArguments("U").WithLocation(6, 12),