109 references to ERR_AttributesNotAllowed
Microsoft.CodeAnalysis.CSharp (4)
Binder\Binder_Lambda.cs (1)
275Error(diagnostics, syntax.Kind() == SyntaxKind.SimpleLambdaExpression ? ErrorCode.ERR_AttributesRequireParenthesizedLambdaExpression : ErrorCode.ERR_AttributesNotAllowed, attributeList);
Binder\Binder_Statements.cs (2)
54Error(diagnostics, ErrorCode.ERR_AttributesNotAllowed, attributeList); 1858Error(diagnostics, ErrorCode.ERR_AttributesNotAllowed, node.AttributeLists[0]);
Errors\ErrorFacts.cs (1)
1527case ErrorCode.ERR_AttributesNotAllowed:
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (1)
Attributes\AttributeTests_WellKnownAttributes.cs (1)
3556Diagnostic(ErrorCode.ERR_AttributesNotAllowed, @"[DllImport(""d.dll"")]").WithLocation(26, 8),
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 (15)
Semantics\LambdaDiscardParametersTests.cs (1)
346Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[System.Obsolete]").WithLocation(6, 51),
Semantics\LambdaTests.cs (3)
664Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[ObsoleteAttribute(message)]").WithLocation(9, 35)); 3715Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(8, 56), 3718Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[B]").WithLocation(8, 59),
Semantics\LocalFunctionTests.cs (2)
1055Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(11, 9)); 9603Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[My(nameof(parameter))]").WithLocation(6, 27)
Semantics\PrimaryConstructorTests.cs (2)
7400Assert.Equal(1, diagnosticsToCheck.Where(d => d.Code is (int)ErrorCode.ERR_AttributesNotAllowed).Count()); 7402diagnosticsToCheck = diagnosticsToCheck.Where(d => d.Code is not (int)ErrorCode.ERR_AttributesNotAllowed);
Semantics\RecordStructTests.cs (1)
9999Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[").WithLocation(7, 26),
Semantics\TopLevelStatementsTests.cs (6)
765Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[System.Obsolete()]").WithLocation(12, 1), 768Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[System.Obsolete()]").WithLocation(15, 1) 5991Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[MyAttribute(i)]").WithLocation(2, 1), 5994Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[MyAttribute(i + 1)]").WithLocation(5, 1), 5997Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[MyAttribute(i + 2)]").WithLocation(8, 1), 6000Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[MyAttribute(i + 3)]").WithLocation(12, 1),
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (88)
Parsing\LocalFunctionParsingTests.cs (2)
979Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9), 1064Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9),
Parsing\ParserErrorMessageTests.cs (4)
3340Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[ObsoleteAttribute(message)]").WithLocation(10, 13), 3343Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[ObsoleteAttribute(message)]").WithLocation(10, 42), 3346Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[ObsoleteAttribute(message)]").WithLocation(11, 13)); 6034Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[Goo(5)]").WithLocation(4, 27)
Parsing\StatementAttributeParsingTests.cs (82)
81Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9)); 146Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9)); 230Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9), 327Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9)); 412Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(8, 13)); 497Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(8, 13)); 563Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9)); 629Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9), 706Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9)); 780Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9)); 852Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9), 933Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9)); 1011Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9)); 1085Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9)); 1187Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9)); 1321Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9)); 1397Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9)); 1474Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9), 1561Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9), 1686Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9)); 1756Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9)); 1826Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 17)); 1896Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9)); 1966Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9), 2154Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9)); 2230Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9)); 2303Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9), 2396Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(9, 17)); 2515Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(8, 13), 2627Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(8, 13), 2718Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9)); 2797Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 13)); 2903Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 17), 2985Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 25)); 3091Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 17), 3173Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 23)); 3249Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 19)); 3326Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9), 3409Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9), 3494Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9), 3576Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9), 3666Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9), 3747Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9), 3821Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9), 3914Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9), 3997Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9), 4085Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9)); 4170Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9)); 4246Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9), 4326Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9), 4414Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9), 4503Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9), 4603Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9)); 4678Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9), 4750Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9), 4848Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9), 4947Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9), 5027Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9)); 5096Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9), 5184Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9), 5265Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9)); 5351Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9)); 5425Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9), 5509Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9)); 5590Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9)); 5705Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(7, 9), 5802Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9), 5904Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9), 6003Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9), 6098Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9), 6179Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9), 6265Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9), 6349Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9), 6428Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9), 6512Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9), 6602Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9), 6738Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9), 6847Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9), 7110Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9), 7217Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9)); 7322Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9), 7431Diagnostic(ErrorCode.ERR_AttributesNotAllowed, "[A]").WithLocation(6, 9));