13 references to ERR_AnnotationDisallowedInObjectCreation
Microsoft.CodeAnalysis.CSharp (2)
Binder\Binder_Expressions.cs (1)
4437
diagnostics.Add(ErrorCode.
ERR_AnnotationDisallowedInObjectCreation
, node.Location);
Errors\ErrorFacts.cs (1)
1913
case ErrorCode.
ERR_AnnotationDisallowedInObjectCreation
:
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (11)
Semantics\NullableReferenceTypesTests.cs (11)
63490
Diagnostic(ErrorCode.
ERR_AnnotationDisallowedInObjectCreation
, "new object?()").WithLocation(6, 14),
63493
Diagnostic(ErrorCode.
ERR_AnnotationDisallowedInObjectCreation
, "new object? { }").WithLocation(7, 14),
63496
Diagnostic(ErrorCode.
ERR_AnnotationDisallowedInObjectCreation
, "new object[]? {}").WithLocation(9, 14),
63505
Diagnostic(ErrorCode.
ERR_AnnotationDisallowedInObjectCreation
, "new T2?()").WithLocation(14, 14),
63514
Diagnostic(ErrorCode.
ERR_AnnotationDisallowedInObjectCreation
, "new T2? { }").WithLocation(15, 14),
63523
Diagnostic(ErrorCode.
ERR_AnnotationDisallowedInObjectCreation
, "new T3?()").WithLocation(21, 14),
63526
Diagnostic(ErrorCode.
ERR_AnnotationDisallowedInObjectCreation
, "new T3? { }").WithLocation(22, 14),
63532
Diagnostic(ErrorCode.
ERR_AnnotationDisallowedInObjectCreation
, "new T4?()").WithLocation(28, 14),
63538
Diagnostic(ErrorCode.
ERR_AnnotationDisallowedInObjectCreation
, "new T4? { }").WithLocation(29, 14),
63547
Diagnostic(ErrorCode.
ERR_AnnotationDisallowedInObjectCreation
, "new T5?()").WithLocation(36, 14),
63553
Diagnostic(ErrorCode.
ERR_AnnotationDisallowedInObjectCreation
, "new T5? { }").WithLocation(37, 14),