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