105 references to ERR_AttributesNotAllowed
Microsoft.CodeAnalysis.CSharp (4)
Binder\Binder_Lambda.cs (1)
284Error(diagnostics, syntax.Kind() == SyntaxKind.SimpleLambdaExpression ? ErrorCode.ERR_AttributesRequireParenthesizedLambdaExpression : ErrorCode.ERR_AttributesNotAllowed, attributeList);
Binder\Binder_Statements.cs (2)
55Error(diagnostics, ErrorCode.ERR_AttributesNotAllowed, attributeList); 1882Error(diagnostics, ErrorCode.ERR_AttributesNotAllowed, node.AttributeLists[0]);
Errors\ErrorFacts.cs (1)
1588or ErrorCode.ERR_AttributesNotAllowed
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (3)
Attributes\AttributeTests_WellKnownAttributes.cs (1)
3637Diagnostic(ErrorCode.ERR_AttributesNotAllowed, @"[DllImport(""d.dll"")]").WithLocation(26, 8),
Semantics\PrimaryConstructorTests.cs (2)
8016Assert.Equal(1, diagnosticsToCheck.Where(d => d.Code is (int)ErrorCode.ERR_AttributesNotAllowed).Count()); 8018diagnosticsToCheck = diagnosticsToCheck.Where(d => d.Code is not (int)ErrorCode.ERR_AttributesNotAllowed);
Microsoft.CodeAnalysis.CSharp.IOperation.UnitTests (1)
IOperation\IOperationTests_IAttributeOperation.cs (1)
1148Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[/*<bind>*/My(10)/*</bind>*/]").WithLocation(15, 9),
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (12)
Semantics\LambdaDiscardParametersTests.cs (1)
346Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[System.Obsolete]").WithLocation(6, 51),
Semantics\LambdaTests.cs (3)
666Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[ObsoleteAttribute(message)]").WithLocation(9, 35)); 3718Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(8, 56), 3721Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[B]").WithLocation(8, 59),
Semantics\LocalFunctionTests.cs (2)
1055Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(11, 9)); 9683Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[My(nameof(parameter))]").WithLocation(6, 27)
Semantics\TopLevelStatementsTests.cs (6)
766Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[System.Obsolete()]").WithLocation(12, 1), 769Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[System.Obsolete()]").WithLocation(15, 1) 6004Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[MyAttribute(i)]").WithLocation(2, 1), 6007Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[MyAttribute(i + 1)]").WithLocation(5, 1), 6010Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[MyAttribute(i + 2)]").WithLocation(8, 1), 6013Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[MyAttribute(i + 3)]").WithLocation(12, 1),
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (85)
Parsing\LocalFunctionParsingTests.cs (2)
979Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9), 1064Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9),
Parsing\ParserErrorMessageTests.cs (4)
3261Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[ObsoleteAttribute(message)]").WithLocation(10, 13), 3264Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[ObsoleteAttribute(message)]").WithLocation(10, 42), 3267Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[ObsoleteAttribute(message)]").WithLocation(11, 13)); 5873Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[Goo(5)]").WithLocation(4, 27)
Parsing\StatementAttributeParsingTests.cs (79)
82Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9)); 147Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9)); 231Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9), 328Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9)); 413Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(8, 13)); 498Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(8, 13)); 564Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9)); 630Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9), 707Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9)); 781Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9)); 853Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9), 934Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9)); 1012Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9)); 1086Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9)); 1188Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9)); 1322Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9)); 1398Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9)); 1475Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9), 1562Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9), 1687Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9)); 1757Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9)); 1827Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 17)); 1897Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9)); 1967Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9), 2155Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9)); 2231Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9)); 2304Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9), 2397Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(9, 17)); 2516Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(8, 13), 2628Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(8, 13), 2719Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9)); 2798Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 13)); 2904Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 17), 2986Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 25)); 3092Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 17), 3174Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 23)); 3250Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 19)); 3327Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9), 3410Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9), 3495Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9), 3577Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9), 3667Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9), 3748Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9), 3822Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9), 3915Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9), 3998Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9), 4086Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9)); 4171Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9)); 4247Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9), 4327Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9), 4415Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9), 4504Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9), 4604Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9)); 4679Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9), 4751Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9), 4849Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9), 4948Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9), 5028Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9)); 5097Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9), 5185Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9), 5266Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9)); 5352Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9)); 5426Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9), 5510Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9)); 5720Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(7, 9), 5817Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9), 5919Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9), 6191Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9), 6277Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9), 6361Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9), 6440Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9), 6524Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9), 6614Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9), 6750Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9), 6859Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9), 7122Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9), 7229Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9)); 7334Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9), 7443Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9));