13 references to ERR_AnnotationDisallowedInObjectCreation
Microsoft.CodeAnalysis.CSharp (2)
Binder\Binder_Expressions.cs (1)
5201diagnostics.Add(ErrorCode.ERR_AnnotationDisallowedInObjectCreation, node.Location);
Errors\ErrorFacts.cs (1)
1970or ErrorCode.ERR_AnnotationDisallowedInObjectCreation
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (11)
Semantics\NullableReferenceTypesTests.cs (11)
66921Diagnostic(ErrorCode.ERR_AnnotationDisallowedInObjectCreation, "new object?()").WithLocation(6, 14), 66924Diagnostic(ErrorCode.ERR_AnnotationDisallowedInObjectCreation, "new object? { }").WithLocation(7, 14), 66927Diagnostic(ErrorCode.ERR_AnnotationDisallowedInObjectCreation, "new object[]? {}").WithLocation(9, 14), 66936Diagnostic(ErrorCode.ERR_AnnotationDisallowedInObjectCreation, "new T2?()").WithLocation(14, 14), 66945Diagnostic(ErrorCode.ERR_AnnotationDisallowedInObjectCreation, "new T2? { }").WithLocation(15, 14), 66954Diagnostic(ErrorCode.ERR_AnnotationDisallowedInObjectCreation, "new T3?()").WithLocation(21, 14), 66957Diagnostic(ErrorCode.ERR_AnnotationDisallowedInObjectCreation, "new T3? { }").WithLocation(22, 14), 66963Diagnostic(ErrorCode.ERR_AnnotationDisallowedInObjectCreation, "new T4?()").WithLocation(28, 14), 66969Diagnostic(ErrorCode.ERR_AnnotationDisallowedInObjectCreation, "new T4? { }").WithLocation(29, 14), 66978Diagnostic(ErrorCode.ERR_AnnotationDisallowedInObjectCreation, "new T5?()").WithLocation(36, 14), 66984Diagnostic(ErrorCode.ERR_AnnotationDisallowedInObjectCreation, "new T5? { }").WithLocation(37, 14),