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