13 references to ERR_AnnotationDisallowedInObjectCreation
Microsoft.CodeAnalysis.CSharp (2)
Binder\Binder_Expressions.cs (1)
5234diagnostics.Add(ErrorCode.ERR_AnnotationDisallowedInObjectCreation, node.Location);
Errors\ErrorFacts.cs (1)
1969or ErrorCode.ERR_AnnotationDisallowedInObjectCreation
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (11)
Semantics\NullableReferenceTypesTests.cs (11)
66922Diagnostic(ErrorCode.ERR_AnnotationDisallowedInObjectCreation, "new object?()").WithLocation(6, 14), 66925Diagnostic(ErrorCode.ERR_AnnotationDisallowedInObjectCreation, "new object? { }").WithLocation(7, 14), 66928Diagnostic(ErrorCode.ERR_AnnotationDisallowedInObjectCreation, "new object[]? {}").WithLocation(9, 14), 66937Diagnostic(ErrorCode.ERR_AnnotationDisallowedInObjectCreation, "new T2?()").WithLocation(14, 14), 66946Diagnostic(ErrorCode.ERR_AnnotationDisallowedInObjectCreation, "new T2? { }").WithLocation(15, 14), 66955Diagnostic(ErrorCode.ERR_AnnotationDisallowedInObjectCreation, "new T3?()").WithLocation(21, 14), 66958Diagnostic(ErrorCode.ERR_AnnotationDisallowedInObjectCreation, "new T3? { }").WithLocation(22, 14), 66964Diagnostic(ErrorCode.ERR_AnnotationDisallowedInObjectCreation, "new T4?()").WithLocation(28, 14), 66970Diagnostic(ErrorCode.ERR_AnnotationDisallowedInObjectCreation, "new T4? { }").WithLocation(29, 14), 66979Diagnostic(ErrorCode.ERR_AnnotationDisallowedInObjectCreation, "new T5?()").WithLocation(36, 14), 66985Diagnostic(ErrorCode.ERR_AnnotationDisallowedInObjectCreation, "new T5? { }").WithLocation(37, 14),