18 references to ERR_AttrDependentTypeNotAllowed
Microsoft.CodeAnalysis.CSharp (2)
Binder\Binder_Expressions.cs (1)
1372
diagnostics.Add(ErrorCode.
ERR_AttrDependentTypeNotAllowed
, errorLocation, type);
Errors\ErrorFacts.cs (1)
2167
case ErrorCode.
ERR_AttrDependentTypeNotAllowed
:
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (16)
Attributes\AttributeTests.cs (16)
10493
Diagnostic(ErrorCode.
ERR_AttrDependentTypeNotAllowed
, "Attr<dynamic>").WithArguments("dynamic").WithLocation(10, 2),
10496
Diagnostic(ErrorCode.
ERR_AttrDependentTypeNotAllowed
, "Attr<List<dynamic>>").WithArguments("dynamic").WithLocation(11, 2),
10499
Diagnostic(ErrorCode.
ERR_AttrDependentTypeNotAllowed
, "Attr<nint>").WithArguments("nint").WithLocation(12, 2),
10502
Diagnostic(ErrorCode.
ERR_AttrDependentTypeNotAllowed
, "Attr<List<nint>>").WithArguments("nint").WithLocation(13, 2),
10505
Diagnostic(ErrorCode.
ERR_AttrDependentTypeNotAllowed
, "Attr<string?>").WithArguments("string").WithLocation(14, 2),
10508
Diagnostic(ErrorCode.
ERR_AttrDependentTypeNotAllowed
, "Attr<List<string?>>").WithArguments("string").WithLocation(15, 2),
10511
Diagnostic(ErrorCode.
ERR_AttrDependentTypeNotAllowed
, "Attr<(int a, int b)>").WithArguments("(int a, int b)").WithLocation(16, 2),
10514
Diagnostic(ErrorCode.
ERR_AttrDependentTypeNotAllowed
, "Attr<List<(int a, int b)>>").WithArguments("(int a, int b)").WithLocation(17, 2),
10517
Diagnostic(ErrorCode.
ERR_AttrDependentTypeNotAllowed
, "Attr<(int a, string? b)>").WithArguments("(int a, string? b)").WithLocation(18, 2));
11178
Diagnostic(ErrorCode.
ERR_AttrDependentTypeNotAllowed
, "A<(int A, int B)>.B").WithArguments("(int A, int B)").WithLocation(4, 2),
11181
Diagnostic(ErrorCode.
ERR_AttrDependentTypeNotAllowed
, "global::A<(int A, int B)>.B").WithArguments("(int A, int B)").WithLocation(9, 2),
11184
Diagnostic(ErrorCode.
ERR_AttrDependentTypeNotAllowed
, "A<(int A, int B)[]>.B").WithArguments("(int A, int B)").WithLocation(14, 2));
11214
Diagnostic(ErrorCode.
ERR_AttrDependentTypeNotAllowed
, "A<(int A, int B)>.B").WithArguments("(int A, int B)").WithLocation(4, 2),
11217
Diagnostic(ErrorCode.
ERR_AttrDependentTypeNotAllowed
, "global::A<(int A, int B)>.B").WithArguments("(int A, int B)").WithLocation(9, 2));
11242
Diagnostic(ErrorCode.
ERR_AttrDependentTypeNotAllowed
, "N2::A<(int A, int B)>.B").WithArguments("(int A, int B)").WithLocation(4, 2));
11267
Diagnostic(ErrorCode.
ERR_AttrDependentTypeNotAllowed
, "AB").WithArguments("(int A, int B)").WithLocation(4, 2));