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