527 references to ERR_PredefinedTypeNotFound
Microsoft.CodeAnalysis.CSharp (2)
Errors\ErrorFacts.cs (1)
598
or ErrorCode.
ERR_PredefinedTypeNotFound
Symbols\MissingMetadataTypeSymbol.cs (1)
324
new CSDiagnosticInfo(ErrorCode.
ERR_PredefinedTypeNotFound
, MetadataHelpers.BuildQualifiedName(_namespaceName, MetadataName)) :
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (27)
CodeGen\CodeGenAsyncTests.cs (3)
3320
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "{}").WithArguments("System.Runtime.CompilerServices.AsyncVoidMethodBuilder").WithLocation(4, 20),
3348
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "{}").WithArguments("System.Runtime.CompilerServices.AsyncTaskMethodBuilder").WithLocation(4, 20),
3379
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "=> 3").WithArguments("System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1").WithLocation(4, 25),
CodeGen\CodeGenAwaitForeachTests.cs (1)
107
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "await foreach (int i in new C()) { }").WithArguments("System.Threading.Tasks.ValueTask").WithLocation(6, 9)
CodeGen\CodeGenAwaitUsingTests.cs (1)
847
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "await").WithArguments("System.Threading.Tasks.ValueTask").WithLocation(6, 9)
CodeGen\CodeGenDynamicTests.cs (2)
470
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "d").WithArguments("System.Runtime.CompilerServices.CallSite"),
500
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "d").WithArguments("System.Runtime.CompilerServices.CallSite`1").WithLocation(6, 16),
CodeGen\CodeGenIterators.cs (2)
2464
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "{ yield return 42; }").WithArguments("System.Collections.Generic.IEnumerable`1").WithLocation(31, 57),
2512
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "{ yield return 42; }").WithArguments("System.Collections.Generic.IEnumerator`1").WithLocation(27, 57),
CodeGen\CodeGenMscorlib.cs (3)
226
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
).WithArguments("System.Void")
302
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "__makeref(result)").WithArguments("System.TypedReference").WithLocation(7, 25)
339
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "__makeref(result)").WithArguments("System.TypedReference").WithLocation(9, 25)
CodeGen\CodeGenScriptTests.cs (1)
610
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "System.Console.WriteLine(1);").WithArguments("System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1").WithLocation(1, 1),
CodeGen\CodeGenUsingDeclarationTests.cs (1)
1349
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "await").WithArguments("System.Threading.Tasks.ValueTask").WithLocation(16, 9)
CodeGen\PatternTests.cs (6)
3326
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "public static bool M(int i) => i switch { 1 => true };").WithArguments("System.Byte").WithLocation(9, 5),
3329
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "public static bool M(int i) => i switch { 1 => true };").WithArguments("System.Byte").WithLocation(9, 5),
3332
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "public static bool M(int i) => i switch { 1 => true };").WithArguments("System.Int16").WithLocation(9, 5),
3335
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "public static bool M(int i) => i switch { 1 => true };").WithArguments("System.Int16").WithLocation(9, 5),
3338
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "public static bool M(int i) => i switch { 1 => true };").WithArguments("System.Int64").WithLocation(9, 5),
3341
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "public static bool M(int i) => i switch { 1 => true };").WithArguments("System.Int64").WithLocation(9, 5),
Emit\InAttributeModifierTests.cs (7)
1508
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "in object x").WithArguments("System.Runtime.InteropServices.InAttribute").WithLocation(9, 27));
1529
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "ref readonly object").WithArguments("System.Runtime.InteropServices.InAttribute").WithLocation(10, 20));
1550
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "ref readonly object").WithArguments("System.Runtime.InteropServices.InAttribute").WithLocation(10, 20));
1573
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "in object p").WithArguments("System.Runtime.InteropServices.InAttribute").WithLocation(9, 32));
1594
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "ref readonly object").WithArguments("System.Runtime.InteropServices.InAttribute").WithLocation(10, 20),
1619
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "in int p").WithArguments("System.Runtime.InteropServices.InAttribute").WithLocation(11, 24));
1640
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "ref readonly int").WithArguments("System.Runtime.InteropServices.InAttribute").WithLocation(11, 17));
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (9)
Emit\UnmanagedTypeModifierTests.cs (9)
429
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "unmanaged").WithArguments("System.Runtime.InteropServices.UnmanagedType").WithLocation(8, 25));
450
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "unmanaged").WithArguments("System.Runtime.InteropServices.UnmanagedType").WithLocation(10, 34));
470
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "unmanaged").WithArguments("System.Runtime.InteropServices.UnmanagedType").WithLocation(10, 39));
502
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "unmanaged").WithArguments("System.Runtime.InteropServices.UnmanagedType").WithLocation(16, 31));
529
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "unmanaged").WithArguments("System.ValueType").WithLocation(15, 25));
557
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "unmanaged").WithArguments("System.ValueType").WithLocation(17, 34));
584
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "unmanaged").WithArguments("System.ValueType").WithLocation(17, 39));
620
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "Int32").WithArguments("System.ValueType").WithLocation(6, 19),
623
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "unmanaged").WithArguments("System.ValueType").WithLocation(20, 31));
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (217)
Attributes\AttributeTests_Embedded.cs (20)
771
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
).WithArguments("System.Attribute").WithLocation(1, 1),
773
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
).WithArguments("System.Attribute").WithLocation(1, 1),
775
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
).WithArguments("System.Attribute").WithLocation(1, 1),
812
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "Attribute").WithArguments("System.Object").WithLocation(4, 18),
815
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "ValueType").WithArguments("System.Object").WithLocation(11, 18),
818
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "Void").WithArguments("System.Object").WithLocation(14, 18),
821
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "Test").WithArguments("System.Object").WithLocation(18, 14),
824
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "object").WithArguments("System.Object").WithLocation(20, 24),
827
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "object").WithArguments("System.Object").WithLocation(20, 12),
830
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "AttributeTargets").WithArguments("System.Object").WithLocation(7, 40),
873
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "set;").WithArguments("System.Void").WithLocation(8, 42),
876
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "set;").WithArguments("System.Void").WithLocation(9, 38),
879
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "public AttributeUsageAttribute(AttributeTargets t) { }").WithArguments("System.Void").WithLocation(7, 9),
882
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "Attribute").WithArguments("System.Void").WithLocation(4, 18),
885
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "ValueType").WithArguments("System.Void").WithLocation(11, 18),
888
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "Test").WithArguments("System.Void").WithLocation(18, 14),
891
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "AttributeUsageAttribute").WithArguments("System.Void").WithLocation(7, 16),
893
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
).WithArguments("System.Void").WithLocation(1, 1),
895
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
).WithArguments("System.Void").WithLocation(1, 1),
897
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
).WithArguments("System.Void").WithLocation(1, 1));
Attributes\AttributeTests_IsByRefLike.cs (3)
401
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "S1").WithArguments("System.Runtime.CompilerServices.IsByRefLikeAttribute").WithLocation(2, 19)
418
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "S2").WithArguments("System.Runtime.CompilerServices.IsByRefLikeAttribute").WithLocation(5, 23),
421
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "S1").WithArguments("System.Runtime.CompilerServices.IsByRefLikeAttribute").WithLocation(4, 23)
Attributes\AttributeTests_IsUnmanaged.cs (4)
668
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "T").WithArguments("System.Runtime.CompilerServices.IsUnmanagedAttribute").WithLocation(2, 19));
683
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "T").WithArguments("System.Runtime.CompilerServices.IsUnmanagedAttribute").WithLocation(4, 19));
705
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "T").WithArguments("System.Runtime.CompilerServices.IsUnmanagedAttribute").WithLocation(6, 16));
716
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "T").WithArguments("System.Runtime.CompilerServices.IsUnmanagedAttribute").WithLocation(1, 24));
Attributes\AttributeTests_NativeInteger.cs (4)
1180
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "nint n").WithArguments("System.Runtime.CompilerServices.NativeIntegerAttribute").WithLocation(5, 19),
1183
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "=>").WithArguments("System.Runtime.CompilerServices.NativeIntegerAttribute").WithLocation(7, 29));
1204
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "nint n").WithArguments("System.Runtime.CompilerServices.NativeIntegerAttribute").WithLocation(5, 17),
1207
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "nuint[]").WithArguments("System.Runtime.CompilerServices.NativeIntegerAttribute").WithLocation(7, 9));
Attributes\AttributeTests_Nullable.cs (47)
620
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
).WithArguments("System.Byte").WithLocation(1, 1),
628
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
).WithArguments("System.Byte").WithLocation(1, 1),
631
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "").WithArguments("System.Int32").WithLocation(1, 1));
662
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
).WithArguments("System.Attribute").WithLocation(1, 1),
664
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
).WithArguments("System.Attribute").WithLocation(1, 1),
672
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
).WithArguments("System.Attribute").WithLocation(1, 1),
997
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "F").WithArguments("System.Runtime.CompilerServices.NullableAttribute").WithLocation(3, 20));
2327
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "object x").WithArguments("System.Runtime.CompilerServices.NullableAttribute").WithLocation(6, 19),
2330
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "=>").WithArguments("System.Runtime.CompilerServices.NullableAttribute").WithLocation(8, 31));
2354
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "object? x").WithArguments("System.Runtime.CompilerServices.NullableAttribute").WithLocation(6, 17),
2357
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "string[]?").WithArguments("System.Runtime.CompilerServices.NullableAttribute").WithLocation(8, 9));
4433
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "T").WithArguments("System.Runtime.CompilerServices.NullableAttribute").WithLocation(1, 9),
4436
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "B").WithArguments("System.Runtime.CompilerServices.NullableAttribute").WithLocation(4, 7));
4453
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "I").WithArguments("System.Runtime.CompilerServices.NullableContextAttribute").WithLocation(1, 11),
4456
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "T").WithArguments("System.Runtime.CompilerServices.NullableAttribute").WithLocation(1, 13),
4459
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "C").WithArguments("System.Runtime.CompilerServices.NullableAttribute").WithLocation(4, 7));
4474
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "object?").WithArguments("System.Runtime.CompilerServices.NullableAttribute").WithLocation(3, 5),
4477
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "F").WithArguments("System.Runtime.CompilerServices.NullableContextAttribute").WithLocation(3, 13));
4492
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "object?[] c").WithArguments("System.Runtime.CompilerServices.NullableAttribute").WithLocation(3, 12));
4507
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "object?[] c").WithArguments("System.Runtime.CompilerServices.NullableAttribute").WithLocation(3, 7));
4522
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "C").WithArguments("System.Runtime.CompilerServices.NullableContextAttribute").WithLocation(1, 7),
4525
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "object?").WithArguments("System.Runtime.CompilerServices.NullableAttribute").WithLocation(3, 5));
4540
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "C").WithArguments("System.Runtime.CompilerServices.NullableContextAttribute").WithLocation(1, 7),
4543
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "object").WithArguments("System.Runtime.CompilerServices.NullableAttribute").WithLocation(3, 5),
4546
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "object x").WithArguments("System.Runtime.CompilerServices.NullableAttribute").WithLocation(3, 17),
4549
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "object? y").WithArguments("System.Runtime.CompilerServices.NullableAttribute").WithLocation(3, 27));
4564
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "object?").WithArguments("System.Runtime.CompilerServices.NullableAttribute").WithLocation(3, 19),
4567
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "+").WithArguments("System.Runtime.CompilerServices.NullableContextAttribute").WithLocation(3, 35),
4570
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "C a").WithArguments("System.Runtime.CompilerServices.NullableAttribute").WithLocation(3, 37),
4573
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "C b").WithArguments("System.Runtime.CompilerServices.NullableAttribute").WithLocation(3, 42)
4589
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "object").WithArguments("System.Runtime.CompilerServices.NullableAttribute").WithLocation(3, 19),
4592
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "+").WithArguments("System.Runtime.CompilerServices.NullableContextAttribute").WithLocation(3, 34),
4595
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "C a").WithArguments("System.Runtime.CompilerServices.NullableAttribute").WithLocation(3, 36),
4598
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "object?[] b").WithArguments("System.Runtime.CompilerServices.NullableAttribute").WithLocation(3, 41));
4610
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "object?").WithArguments("System.Runtime.CompilerServices.NullableAttribute").WithLocation(1, 10),
4613
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "D").WithArguments("System.Runtime.CompilerServices.NullableContextAttribute").WithLocation(1, 18));
4625
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "object?[] o").WithArguments("System.Runtime.CompilerServices.NullableAttribute").WithLocation(1, 17));
4673
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "D").WithArguments("System.Runtime.CompilerServices.NullableContextAttribute").WithLocation(1, 15),
4676
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "T").WithArguments("System.Runtime.CompilerServices.NullableAttribute").WithLocation(1, 17),
4679
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "T t").WithArguments("System.Runtime.CompilerServices.NullableAttribute").WithLocation(1, 20),
4682
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "F").WithArguments("System.Runtime.CompilerServices.NullableContextAttribute").WithLocation(4, 17),
4685
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "T").WithArguments("System.Runtime.CompilerServices.NullableAttribute").WithLocation(4, 19),
4688
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "D<T> d").WithArguments("System.Runtime.CompilerServices.NullableAttribute").WithLocation(4, 22),
4691
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "object? o").WithArguments("System.Runtime.CompilerServices.NullableAttribute").WithLocation(9, 12));
4710
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "object?[]").WithArguments("System.Runtime.CompilerServices.NullableAttribute").WithLocation(5, 9));
4729
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "object? x").WithArguments("System.Runtime.CompilerServices.NullableAttribute").WithLocation(5, 16),
4732
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "object y").WithArguments("System.Runtime.CompilerServices.NullableAttribute").WithLocation(5, 27));
Attributes\AttributeTests_ReadOnlyStruct.cs (3)
391
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "S1").WithArguments("System.Runtime.CompilerServices.IsReadOnlyAttribute").WithLocation(2, 24)
408
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "S2").WithArguments("System.Runtime.CompilerServices.IsReadOnlyAttribute").WithLocation(5, 28),
411
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "S1").WithArguments("System.Runtime.CompilerServices.IsReadOnlyAttribute").WithLocation(4, 28)
Attributes\AttributeTests_RefReadOnly.cs (10)
1098
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "in int x").WithArguments("System.Runtime.CompilerServices.IsReadOnlyAttribute").WithLocation(4, 19));
1114
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "in int x").WithArguments("System.Runtime.CompilerServices.IsReadOnlyAttribute").WithLocation(4, 20),
1117
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "in int x").WithArguments("System.Runtime.CompilerServices.IsReadOnlyAttribute").WithLocation(5, 20));
1138
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "in int p").WithArguments("System.Runtime.CompilerServices.IsReadOnlyAttribute").WithLocation(6, 20));
1539
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "in int p").WithArguments("System.Runtime.CompilerServices.IsReadOnlyAttribute").WithLocation(8, 18));
1563
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "in int x").WithArguments("System.Runtime.CompilerServices.IsReadOnlyAttribute").WithLocation(7, 20));
2442
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "in int x").WithArguments("System.Runtime.CompilerServices.IsReadOnlyAttribute").WithLocation(5, 19),
2445
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "=>").WithArguments("System.Runtime.CompilerServices.IsReadOnlyAttribute").WithLocation(9, 39));
2468
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "in int y").WithArguments("System.Runtime.CompilerServices.IsReadOnlyAttribute").WithLocation(5, 28),
2471
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "ref readonly int").WithArguments("System.Runtime.CompilerServices.IsReadOnlyAttribute").WithLocation(9, 9));
Attributes\AttributeTests_Tuples.cs (2)
185
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "(int x, int y)").WithArguments("System.String").WithLocation(6, 11),
223
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "(int x, int y)").WithArguments("System.String").WithLocation(4, 12),
RefReadonlyParameterTests.cs (5)
1270
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "ref readonly int").WithArguments("System.Runtime.CompilerServices.RequiresLocationAttribute").WithLocation(3, 36));
1287
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "ref readonly int").WithArguments("System.Runtime.CompilerServices.RequiresLocationAttribute").WithLocation(3, 37));
1320
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "ref readonly int").WithArguments("System.Runtime.CompilerServices.RequiresLocationAttribute").WithLocation(3, 38),
1346
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "ref readonly int").WithArguments("System.Runtime.CompilerServices.RequiresLocationAttribute").WithLocation(3, 38),
1543
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "ref readonly int").WithArguments("System.Runtime.CompilerServices.RequiresLocationAttribute").WithLocation(5, 19));
Semantics\CollectionExpressionTests.cs (8)
13396
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "[0]").WithArguments(missingTypeName).WithLocation(6, 30),
13399
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "[..x]").WithArguments(missingTypeName).WithLocation(7, 30),
13794
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "[0]").WithArguments(missingTypeName).WithLocation(6, 30),
13797
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "[..x]").WithArguments(missingTypeName).WithLocation(7, 30));
19729
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, @"[""2"", ""3""]").WithArguments("System.Int32").WithLocation(7, 34),
19732
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, @"[""2"", ""3""]").WithArguments("System.Int32").WithLocation(7, 34),
19735
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, @"[""2"", ""3""]").WithArguments("System.Int32").WithLocation(7, 34),
19738
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, @"[""2"", ""3""]").WithArguments("System.Int32").WithLocation(7, 34));
Semantics\InlineArrayTests.cs (2)
18800
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "x").WithArguments("System.Span`1").WithLocation(6, 27)
19091
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "x").WithArguments("System.ReadOnlySpan`1").WithLocation(6, 27)
Semantics\ParamsCollectionTests.cs (10)
12747
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "params IEnumerable<long> x").WithArguments("System.Runtime.CompilerServices.ParamCollectionAttribute").WithLocation(5, 20)
12864
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "params IEnumerable<long> x").WithArguments("System.Runtime.CompilerServices.ParamCollectionAttribute").WithLocation(3, 23)
12897
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "Params.Test1").WithArguments("System.Runtime.CompilerServices.ParamCollectionAttribute").WithLocation(6, 18)
12923
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "params IEnumerable<long> a").WithArguments("System.Runtime.CompilerServices.ParamCollectionAttribute").WithLocation(8, 19)
12975
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "Test1").WithArguments("System.Runtime.CompilerServices.ParamCollectionAttribute").WithLocation(7, 18)
12998
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "params IEnumerable<long> x").WithArguments("System.Runtime.CompilerServices.ParamCollectionAttribute").WithLocation(5, 15)
13049
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "params IEnumerable<long> x").WithArguments("System.Runtime.CompilerServices.ParamCollectionAttribute").WithLocation(5, 14)
13071
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "params IEnumerable<long> x").WithArguments("System.Runtime.CompilerServices.ParamCollectionAttribute").WithLocation(5, 14)
13093
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "params IEnumerable<long> x").WithArguments("System.Runtime.CompilerServices.ParamCollectionAttribute").WithLocation(5, 14)
13115
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "params IEnumerable<long> x").WithArguments("System.Runtime.CompilerServices.ParamCollectionAttribute").WithLocation(5, 14)
Semantics\PatternMatchingTests.cs (4)
7319
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "new System.NullReferenceException()").WithArguments("System.Exception").WithLocation(7, 21),
7322
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "null").WithArguments("System.Exception").WithLocation(8, 21),
7325
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "null").WithArguments("System.Exception").WithLocation(10, 15),
7328
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "d").WithArguments("System.Exception").WithLocation(11, 27)
Semantics\PatternMatchingTests_ListPatterns.cs (14)
3712
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "[var item, ..var slice]").WithArguments("System.Index").WithLocation(7, 25),
3715
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "..var slice").WithArguments("System.Range").WithLocation(7, 36)
5335
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, ".._").WithArguments("System.Range").WithLocation(7, 22)
5499
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "..var rest").WithArguments("System.Range").WithLocation(10, 32),
5505
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "1..^1").WithArguments("System.Range").WithLocation(12, 18)
5816
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "[_]").WithArguments("System.Index").WithLocation(5, 5),
5825
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "[ _, _, .. ]").WithArguments("System.Index").WithLocation(13, 5),
5834
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "[_, _]").WithArguments("System.Index").WithLocation(20, 5),
5840
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "[_, _, ..]").WithArguments("System.Index").WithLocation(21, 5),
5846
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "[_, _]").WithArguments("System.Index").WithLocation(28, 5),
7868
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "[var x]").WithArguments("System.Index").WithLocation(12, 21),
7874
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "[.. var y]").WithArguments("System.Index").WithLocation(12, 40),
7880
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, ".. var y").WithArguments("System.Range").WithLocation(12, 41),
8196
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "[var x]").WithArguments("System.Index").WithLocation(2, 16),
Semantics\PatternMatchingTests_NullableTypes.cs (2)
76
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "[]").WithArguments("System.Index").WithLocation(12, 32),
142
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "[]").WithArguments("System.Index").WithLocation(12, 34));
Semantics\PatternMatchingTests2.cs (4)
3274
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
).WithArguments("System.Int32").WithLocation(1, 1),
3277
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, @"switch (s)
3290
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, @"switch (s)
3303
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, @"case not ""one"" when b1:").WithArguments("System.Int32").WithLocation(8, 13)
Semantics\PatternMatchingTests4.cs (1)
158
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "stackalloc int[1] { 0 }").WithArguments("System.Span`1").WithLocation(10, 18),
Semantics\PatternMatchingTests5.cs (7)
1995
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "[]").WithArguments("System.Index").WithLocation(11, 9),
2039
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "[]").WithArguments("System.Index").WithLocation(11, 9),
2086
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "[]").WithArguments("System.Index").WithLocation(11, 9),
2136
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "[]").WithArguments("System.Index").WithLocation(11, 9),
2194
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "[]").WithArguments("System.Index").WithLocation(10, 5),
2256
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "[]").WithArguments("System.Index").WithLocation(10, 5),
2320
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "[]").WithArguments("System.Index").WithLocation(10, 5),
Semantics\PrimaryConstructorTests.cs (2)
7988
diagnosticsToCheck.Where(d => d.Code is (int)ErrorCode.
ERR_PredefinedTypeNotFound
).Any())
7993
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "p1").WithArguments("System.Runtime.CompilerServices.IsExternalInit").WithLocation(1000, 1)
Semantics\RecordTests.cs (65)
5204
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "record C1;").WithArguments("System.Text.StringBuilder").WithLocation(2, 1),
5210
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "C1").WithArguments("System.Text.StringBuilder").WithLocation(2, 8)
16403
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "A").WithArguments("System.Type").WithLocation(2, 15),
16406
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, @"public record A {
16410
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, @"public record A {
16414
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, @"public record A {
16417
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
).WithArguments("System.Attribute").WithLocation(1, 1),
16419
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
).WithArguments("System.Attribute").WithLocation(1, 1),
16421
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
).WithArguments("System.Byte").WithLocation(1, 1),
16429
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
).WithArguments("System.Attribute").WithLocation(1, 1),
16431
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
).WithArguments("System.Byte").WithLocation(1, 1),
17352
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, @"public record A {
17357
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, @"public record A {
17362
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "A").WithArguments("System.Type").WithLocation(2, 15),
17364
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
).WithArguments("System.Attribute").WithLocation(1, 1),
17366
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
).WithArguments("System.Attribute").WithLocation(1, 1),
17368
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
).WithArguments("System.Byte").WithLocation(1, 1),
17376
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
).WithArguments("System.Attribute").WithLocation(1, 1),
17378
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
).WithArguments("System.Byte").WithLocation(1, 1),
17448
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, @"public record A {
17453
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, @"public record A {
17458
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "A").WithArguments("System.Type").WithLocation(2, 15),
17460
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
).WithArguments("System.Attribute").WithLocation(1, 1),
17462
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
).WithArguments("System.Attribute").WithLocation(1, 1),
17464
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
).WithArguments("System.Byte").WithLocation(1, 1),
17472
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
).WithArguments("System.Attribute").WithLocation(1, 1),
17474
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
).WithArguments("System.Byte").WithLocation(1, 1),
17544
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "A").WithArguments("System.Type").WithLocation(2, 15),
17547
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, @"public record A {
17551
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, @"public record A {
17555
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, @"public record A {
17558
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
).WithArguments("System.Attribute").WithLocation(1, 1),
17560
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
).WithArguments("System.Attribute").WithLocation(1, 1),
17562
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
).WithArguments("System.Byte").WithLocation(1, 1),
17570
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
).WithArguments("System.Attribute").WithLocation(1, 1),
17572
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
).WithArguments("System.Byte").WithLocation(1, 1),
18617
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, @"record A
18626
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, @"record A
18635
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, @"record A
18644
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, @"record A
18653
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "A").WithArguments("System.Boolean").WithLocation(2, 8),
18656
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "A").WithArguments("System.Boolean").WithLocation(2, 8),
18659
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "A").WithArguments("System.Boolean").WithLocation(2, 8),
18662
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "A").WithArguments("System.Boolean").WithLocation(2, 8),
18665
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "bool").WithArguments("System.Boolean").WithLocation(4, 20),
19281
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "A").WithArguments("System.Type").WithLocation(2, 8)
24391
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "A").WithArguments("System.IEquatable`1").WithLocation(1, 8),
24394
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "A").WithArguments("System.IEquatable`1").WithLocation(1, 8),
24397
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "A").WithArguments("System.Type").WithLocation(1, 8),
24400
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "B").WithArguments("System.IEquatable`1").WithLocation(2, 8),
24403
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "B").WithArguments("System.IEquatable`1").WithLocation(2, 8),
24406
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "B").WithArguments("System.Type").WithLocation(2, 8)
24456
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "A").WithArguments("System.IEquatable`1").WithLocation(1, 8),
24459
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "A").WithArguments("System.IEquatable`1").WithLocation(1, 8),
24462
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "A").WithArguments("System.Type").WithLocation(1, 8),
24468
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "B").WithArguments("System.IEquatable`1").WithLocation(2, 8),
24471
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "B").WithArguments("System.IEquatable`1").WithLocation(2, 8),
24474
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "B").WithArguments("System.Type").WithLocation(2, 8),
24530
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "A").WithArguments("System.IEquatable`1").WithLocation(2, 8),
24533
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "A").WithArguments("System.IEquatable`1").WithLocation(2, 8),
24536
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "A").WithArguments("System.Type").WithLocation(2, 8),
24542
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "B").WithArguments("System.IEquatable`1").WithLocation(3, 8),
24545
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "B").WithArguments("System.IEquatable`1").WithLocation(3, 8),
24548
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "B").WithArguments("System.Type").WithLocation(3, 8),
24611
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "A").WithArguments("System.Type").WithLocation(1, 8),
Microsoft.CodeAnalysis.CSharp.IOperation.UnitTests (77)
IOperation\IOperationTests_IArgument.cs (76)
2432
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "void").WithArguments("System.Void").WithLocation(4, 12),
2435
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "bool").WithArguments("System.Boolean").WithLocation(9, 20),
2438
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "bool?").WithArguments("System.Nullable`1").WithLocation(9, 20),
2441
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "void").WithArguments("System.Void").WithLocation(9, 12),
2444
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "P").WithArguments("System.Object").WithLocation(2, 7),
2447
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "true").WithArguments("System.Boolean").WithLocation(9, 30),
2450
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "M2").WithArguments("System.Object").WithLocation(6, 19),
2494
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "P").WithArguments("System.Object").WithLocation(4, 12),
2497
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "bool").WithArguments("System.Boolean").WithLocation(9, 7),
2500
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "bool?").WithArguments("System.Nullable`1").WithLocation(9, 7),
2503
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, @"P(bool? x = true)
2508
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "P").WithArguments("System.Object").WithLocation(2, 7),
2511
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "true").WithArguments("System.Boolean").WithLocation(9, 17),
2514
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "P").WithArguments("System.Object").WithLocation(6, 30),
2566
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "int").WithArguments("System.Int32").WithLocation(5, 13),
2569
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "int").WithArguments("System.Int32").WithLocation(6, 12),
2572
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "int").WithArguments("System.Int32").WithLocation(6, 21),
2575
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "int").WithArguments("System.Int32").WithLocation(6, 28),
2578
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "int?").WithArguments("System.Nullable`1").WithLocation(6, 28),
2581
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "set { _number = value; }").WithArguments("System.Void").WithLocation(9, 9),
2584
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "void").WithArguments("System.Void").WithLocation(12, 5),
2587
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "P").WithArguments("System.Object").WithLocation(3, 7),
2590
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "5").WithArguments("System.Int32").WithLocation(6, 37),
2596
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "0").WithArguments("System.Int32").WithLocation(5, 27),
2599
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "0").WithArguments("System.Int32").WithLocation(14, 24),
2602
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "9").WithArguments("System.Int32").WithLocation(14, 40),
2643
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "void").WithArguments("System.Void").WithLocation(4, 12),
2646
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "bool").WithArguments("System.Boolean").WithLocation(9, 20),
2649
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "bool?").WithArguments("System.Nullable`1").WithLocation(9, 20),
2652
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "void").WithArguments("System.Void").WithLocation(9, 12),
2655
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "P").WithArguments("System.Object").WithLocation(2, 7),
2658
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "M2").WithArguments("System.Object").WithLocation(6, 19),
2699
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "P").WithArguments("System.Object").WithLocation(2, 7),
2702
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "P").WithArguments("System.Object").WithLocation(4, 12),
2705
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "bool").WithArguments("System.Boolean").WithLocation(9, 7),
2708
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "bool?").WithArguments("System.Nullable`1").WithLocation(9, 7),
2711
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, @"P(bool? x = null)
2716
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "P").WithArguments("System.Object").WithLocation(6, 30),
2768
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "int").WithArguments("System.Int32").WithLocation(4, 13),
2771
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "int").WithArguments("System.Int32").WithLocation(5, 12),
2777
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "int").WithArguments("System.Int32").WithLocation(5, 21),
2780
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "int").WithArguments("System.Int32").WithLocation(5, 28),
2783
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "int?").WithArguments("System.Nullable`1").WithLocation(5, 28),
2786
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "set { _number = value; }").WithArguments("System.Void").WithLocation(8, 9),
2789
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "void").WithArguments("System.Void").WithLocation(11, 5),
2792
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "P").WithArguments("System.Object").WithLocation(2, 7),
2795
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "0").WithArguments("System.Int32").WithLocation(4, 27),
2798
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "0").WithArguments("System.Int32").WithLocation(13, 24),
2801
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "9").WithArguments("System.Int32").WithLocation(13, 40),
3813
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "int").WithArguments("System.Int32").WithLocation(4, 13),
3816
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "int").WithArguments("System.Int32").WithLocation(5, 12),
3819
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "int").WithArguments("System.Int32").WithLocation(5, 21),
3822
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "int").WithArguments("System.Int32").WithLocation(5, 28),
3825
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "int?").WithArguments("System.Nullable`1").WithLocation(5, 28),
3828
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "set { _number = value; }").WithArguments("System.Void").WithLocation(8, 9),
3831
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "P").WithArguments("System.Object").WithLocation(11, 5),
3834
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "P").WithArguments("System.Object").WithLocation(2, 7),
3837
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "0").WithArguments("System.Int32").WithLocation(5, 37),
3843
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "0").WithArguments("System.Int32").WithLocation(4, 27),
3846
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "P").WithArguments("System.Object").WithLocation(13, 30),
3849
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "0").WithArguments("System.Int32").WithLocation(13, 37),
3852
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "1").WithArguments("System.Int32").WithLocation(13, 42),
3855
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "P").WithArguments("System.Void").WithLocation(13, 30),
3911
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "int").WithArguments("System.Int32").WithLocation(4, 13),
3914
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "int").WithArguments("System.Int32").WithLocation(5, 12),
3920
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "int").WithArguments("System.Int32").WithLocation(5, 21),
3923
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "int").WithArguments("System.Int32").WithLocation(5, 28),
3926
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "int?").WithArguments("System.Nullable`1").WithLocation(5, 28),
3929
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "set { _number = value; }").WithArguments("System.Void").WithLocation(8, 9),
3932
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "P").WithArguments("System.Object").WithLocation(11, 5),
3935
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "P").WithArguments("System.Object").WithLocation(2, 7),
3938
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "0").WithArguments("System.Int32").WithLocation(4, 27),
3941
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "P").WithArguments("System.Object").WithLocation(13, 30),
3944
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "0").WithArguments("System.Int32").WithLocation(13, 37),
3947
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "1").WithArguments("System.Int32").WithLocation(13, 42),
3950
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "P").WithArguments("System.Void").WithLocation(13, 30),
IOperation\IOperationTests_IIsPatternExpression.cs (1)
2327
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "[]").WithArguments("System.Index").WithLocation(8, 31)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (126)
Semantics\DelegateTypeTests.cs (10)
4182
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "Main").WithArguments("System.Action").WithLocation(6, 13),
4185
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "() => 1").WithArguments("System.Func`1").WithLocation(7, 13),
4354
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "() => 1").WithArguments("System.Linq.Expressions.Expression`1").WithLocation(5, 48),
4690
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
).WithArguments("System.IntPtr").WithLocation(1, 1),
4693
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "(ref int i) => i").WithArguments("System.IntPtr").WithLocation(6, 13));
4726
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
).WithArguments("System.IntPtr").WithLocation(1, 1),
4729
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "(int* p) => p").WithArguments("System.IntPtr").WithLocation(6, 13));
4762
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
).WithArguments("System.MulticastDelegate").WithLocation(1, 1));
18586
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "1.0").WithArguments("System.Double").WithLocation(1, 24),
18592
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "2m").WithArguments("System.Decimal").WithLocation(2, 24));
Semantics\ForEachTests.cs (1)
2293
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
).WithArguments("System.Byte").WithLocation(1, 1),
Semantics\GenericConstraintsTests.cs (2)
1946
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "unmanaged").WithArguments("System.Runtime.InteropServices.UnmanagedType").WithLocation(8, 32));
1972
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "unmanaged").WithArguments("System.ValueType").WithLocation(16, 32));
Semantics\IndexAndRangeTests.cs (7)
677
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "0..2").WithArguments("System.Range").WithLocation(4, 31));
816
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "^arg").WithArguments("System.Index").WithLocation(6, 17));
1019
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "1..2").WithArguments("System.Range").WithLocation(6, 17),
1022
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "1..").WithArguments("System.Range").WithLocation(7, 17),
1025
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "..2").WithArguments("System.Range").WithLocation(8, 17),
1028
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "..").WithArguments("System.Range").WithLocation(9, 17));
1220
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "arg..arg").WithArguments("System.Boolean").WithLocation(25, 17));
Semantics\InitOnlyMemberTests.cs (2)
775
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "init").WithArguments("System.Runtime.CompilerServices.IsExternalInit").WithLocation(4, 49)
4832
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "init").WithArguments("System.Runtime.CompilerServices.IsExternalInit").WithLocation(8, 35)
Semantics\InterpolationTests.cs (2)
883
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, @"$""test""").WithArguments("System.Runtime.CompilerServices.FormattableStringFactory").WithLocation(5, 26)
4433
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, @"$""Literal{1}""").WithArguments("System.Boolean").WithLocation(1, 19)
Semantics\NativeIntegerTests.cs (11)
691
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "nint").WithArguments("System.IntPtr").WithLocation(3, 30),
697
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "nuint").WithArguments("System.UIntPtr").WithLocation(4, 31)
904
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "F1").WithArguments("System.IntPtr").WithLocation(5, 13),
907
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "F2").WithArguments("System.UIntPtr").WithLocation(6, 13));
974
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "nint").WithArguments("System.IntPtr").WithLocation(3, 19),
977
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "nuint").WithArguments("System.UIntPtr").WithLocation(4, 19));
1021
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "F1").WithArguments("System.IntPtr").WithLocation(5, 13),
1024
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "F2").WithArguments("System.UIntPtr").WithLocation(6, 13));
1170
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "C").WithArguments("System.Void").WithLocation(1, 7),
1173
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "B").WithArguments("System.IntPtr").WithLocation(1, 11),
1245
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "B").WithArguments("System.Void").WithLocation(1, 7),
Semantics\NullableReferenceTypesTests.cs (14)
8722
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "E").WithArguments("System.Int32").WithLocation(1, 6),
8725
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "int").WithArguments("System.Int32").WithLocation(4, 5),
8728
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "int").WithArguments("System.Int32").WithLocation(4, 17));
8758
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "T?").WithArguments("System.Nullable`1").WithLocation(6, 9)
8771
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "T?").WithArguments("System.Nullable`1").WithLocation(4, 12)
8784
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "T?").WithArguments("System.Nullable`1").WithLocation(4, 27),
8787
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "U").WithArguments("System.Nullable`1").WithLocation(4, 12)
116734
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
).WithArguments("System.Attribute").WithLocation(1, 1),
116736
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
).WithArguments("System.Attribute").WithLocation(1, 1),
116744
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
).WithArguments("System.Attribute").WithLocation(1, 1),
116746
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
).WithArguments("System.Byte").WithLocation(1, 1),
116754
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
).WithArguments("System.Attribute").WithLocation(1, 1),
116756
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
).WithArguments("System.Int32").WithLocation(1, 1),
116764
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
).WithArguments("System.Byte").WithLocation(1, 1));
Semantics\NullableTests.cs (10)
2216
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "Y?").WithArguments("System.Nullable`1").WithLocation(4, 7),
2219
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "() => M2()").WithArguments("System.Nullable`1").WithLocation(4, 22),
2222
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "M2").WithArguments("System.Nullable`1").WithLocation(4, 28),
2225
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "Y?").WithArguments("System.Nullable`1").WithLocation(5, 7),
2228
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "new()").WithArguments("System.Nullable`1").WithLocation(5, 19));
2252
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "Y?").WithArguments("System.Nullable`1").WithLocation(4, 7),
2255
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "() => M2()").WithArguments("System.Nullable`1").WithLocation(4, 22),
2258
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "M2").WithArguments("System.Nullable`1").WithLocation(4, 28),
2264
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "Y?").WithArguments("System.Nullable`1").WithLocation(5, 7),
2267
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "new()").WithArguments("System.Nullable`1").WithLocation(5, 19));
Semantics\RawInterpolationTests.cs (1)
897
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, @"$""""""test""""""").WithArguments("System.Runtime.CompilerServices.FormattableStringFactory").WithLocation(5, 26));
Semantics\RawInterpolationTests_Handler.cs (1)
2710
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, @"$""""""Literal{1}""""""").WithArguments("System.Boolean").WithLocation(1, 19));
Semantics\ReadOnlyStructsTests.cs (1)
1693
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "get").WithArguments("System.Runtime.CompilerServices.IsReadOnlyAttribute").WithLocation(4, 30));
Semantics\RecordStructTests.cs (11)
4239
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "A").WithArguments("System.IEquatable`1").WithLocation(2, 15),
4242
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "A").WithArguments("System.IEquatable`1").WithLocation(2, 15)
4478
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, @"record struct A
4487
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, @"record struct A
4496
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "A").WithArguments("System.Boolean").WithLocation(2, 15),
4499
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "A").WithArguments("System.Boolean").WithLocation(2, 15),
4502
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "A").WithArguments("System.Boolean").WithLocation(2, 15),
4505
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "A").WithArguments("System.Boolean").WithLocation(2, 15),
4508
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "bool").WithArguments("System.Boolean").WithLocation(4, 12),
5283
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "record struct C1;").WithArguments("System.Text.StringBuilder").WithLocation(2, 1),
5289
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "C1").WithArguments("System.Text.StringBuilder").WithLocation(2, 15)
Semantics\RefFieldTests.cs (2)
9942
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "init").WithArguments("System.Runtime.CompilerServices.IsExternalInit").WithLocation(6, 28),
10013
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "init").WithArguments("System.Runtime.CompilerServices.IsExternalInit").WithLocation(6, 37),
Semantics\ScriptSemanticsTests.cs (8)
149
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "interface I {}").WithArguments("System.Object").WithLocation(1, 1),
152
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "").WithArguments("System.Void").WithLocation(1, 1));
302
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "1").WithArguments("System.Object").WithLocation(1, 1),
304
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
).WithArguments("System.Object").WithLocation(1, 1),
306
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
).WithArguments("System.Threading.Tasks.Task`1").WithLocation(1, 1),
311
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "").WithArguments("System.Object").WithLocation(1, 1),
313
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
).WithArguments("System.Object").WithLocation(1, 1),
316
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "1").WithArguments("System.Int32").WithLocation(1, 1));
Semantics\StackAllocInitializerTests.cs (3)
1259
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "stackalloc int [3] { 1, 2, 3 }").WithArguments("System.Span`1").WithLocation(6, 24),
1265
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "stackalloc int [ ] { 1, 2, 3 }").WithArguments("System.Span`1").WithLocation(7, 24),
1271
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "stackalloc [ ] { 1, 2, 3 }").WithArguments("System.Span`1").WithLocation(8, 24)
Semantics\StackAllocSpanExpressionsTests.cs (1)
208
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "stackalloc int [10]").WithArguments("System.Span`1").WithLocation(6, 23));
Semantics\TopLevelStatementsTests.cs (16)
7450
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "return").WithArguments("System.Object").WithLocation(1, 1),
7452
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
).WithArguments("System.Void").WithLocation(1, 1),
7454
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
).WithArguments("System.String").WithLocation(1, 1),
7469
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
).WithArguments("System.Threading.Tasks.Task").WithLocation(1, 1),
7496
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
).WithArguments("System.Int32").WithLocation(1, 1),
7499
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "10").WithArguments("System.Int32").WithLocation(3, 8)
7518
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
).WithArguments("System.Int32").WithLocation(1, 1),
7528
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "await System.Threading.Tasks.Task.Factory.StartNew(() => 5L);").WithArguments("System.Int32").WithLocation(2, 1),
7531
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "await System.Threading.Tasks.Task.Factory.StartNew(() => 5L);").WithArguments("System.Int32").WithLocation(2, 1),
7534
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "await System.Threading.Tasks.Task.Factory.StartNew(() => 5L);").WithArguments("System.Int32").WithLocation(2, 1),
7537
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "11").WithArguments("System.Int32").WithLocation(3, 8)
7556
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
).WithArguments("System.Threading.Tasks.Task`1").WithLocation(1, 1),
7583
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
).WithArguments("System.Threading.Tasks.Task`1").WithLocation(1, 1),
7585
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
).WithArguments("System.Int32").WithLocation(1, 1),
7595
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "11").WithArguments("System.Int32").WithLocation(3, 8)
7612
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
).WithArguments("System.String").WithLocation(1, 1)
Semantics\UseSiteErrorTests.cs (15)
1226
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "C").WithArguments("System.Object"),
1229
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "int").WithArguments("System.Int32"),
1232
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "set;").WithArguments("System.Void"),
1317
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "SecurityAction").WithArguments("System.Int32"));
1321
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "SecurityAction").WithArguments("System.Int32"));
1366
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "SecurityAction").WithArguments("System.Int32"));
1370
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "SecurityAction").WithArguments("System.Int32"));
1398
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "SecurityAction").WithArguments("System.Int32"));
1402
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "SecurityAction").WithArguments("System.Int32"));
1481
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "SecurityAction").WithArguments("System.Int32"));
1487
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "SecurityAction").WithArguments("System.Int32"));
1535
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "SecurityAction").WithArguments("System.Int32"));
1542
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "SecurityAction").WithArguments("System.Int32"));
1588
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "SecurityAction").WithArguments("System.Int32"));
1594
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "SecurityAction").WithArguments("System.Int32"));
Semantics\UsingStatementTests.cs (1)
1803
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "using").WithArguments("System.IDisposable").WithLocation(11, 9),
Semantics\Utf8StringsLiteralsTests.cs (7)
1921
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, @"""hello""u8").WithArguments("System.Byte").WithLocation(7, 13)
1926
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, @"""hello""u8").WithArguments("System.Byte").WithLocation(7, 13)
1949
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, @"""hello""u8").WithArguments("System.Int32").WithLocation(7, 13),
1952
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, @"""hello""u8").WithArguments("System.Int32").WithLocation(7, 13),
1955
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, @"""hello""u8").WithArguments("System.Int32").WithLocation(7, 13)
1977
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, @"""hello""u8").WithArguments("System.ReadOnlySpan`1").WithLocation(7, 13)
1982
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, @"""hello""u8").WithArguments("System.ReadOnlySpan`1").WithLocation(7, 13)
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (37)
Symbols\DefaultInterfaceImplementationTests.cs (2)
67878
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "string").WithArguments("System.String").WithLocation(6, 22),
67906
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "string").WithArguments("System.String").WithLocation(6, 22),
Symbols\FunctionPointerTypeSymbolTests.cs (3)
1026
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "in string").WithArguments("System.Runtime.InteropServices.InAttribute").WithLocation(4, 29),
1029
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "out string").WithArguments("System.Runtime.InteropServices.OutAttribute").WithLocation(4, 40));
1914
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "ref readonly int").WithArguments("System.Runtime.CompilerServices.RequiresLocationAttribute").WithLocation(9, 19),
Symbols\GenericConstraintTests.cs (7)
5771
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "A").WithArguments("System.Object").WithLocation(1, 7),
5774
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "B").WithArguments("System.Object").WithLocation(2, 7),
5799
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "A").WithArguments("System.Object").WithLocation(2, 16),
5802
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "S").WithArguments("System.ValueType").WithLocation(1, 8),
5805
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "void").WithArguments("System.Void").WithLocation(4, 23),
5808
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "void").WithArguments("System.Void").WithLocation(8, 23),
5814
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "B").WithArguments("System.Void").WithLocation(6, 7));
Symbols\Retargeting\RetargetingTests.cs (14)
337
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "E").WithArguments("System.Enum"),
340
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "E").WithArguments("System.Int32"));
374
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "E").WithArguments("System.Enum"),
377
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "short").WithArguments("System.Int16"));
434
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "short").WithArguments("System.Int16"),
437
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "short").WithArguments("System.Int16"));
513
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "short").WithArguments("System.Int16"),
516
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "Test").WithArguments("System.ValueType"),
519
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "Test").WithArguments("System.Int16"));
574
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "short").WithArguments("System.Int16"),
577
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "Test").WithArguments("System.Int16"));
635
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "C").WithArguments("System.Object"),
638
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "int").WithArguments("System.Int32"),
641
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "T").WithArguments("System.Int32"),
Symbols\Source\DelegateTests.cs (5)
33
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "A").WithArguments("System.MulticastDelegate"),
36
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "void").WithArguments("System.Void"),
39
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "delegate void A();").WithArguments("System.Void"),
42
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "delegate void A();").WithArguments("System.Object"),
45
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "delegate void A();").WithArguments("System.IntPtr")
Symbols\SymbolErrorTests.cs (6)
8693
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "Test").WithArguments("System.Object"),
8696
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "int").WithArguments("System.Int32"),
8699
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "1").WithArguments("System.Int32"),
8715
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "1..2").WithArguments("System.Range").WithLocation(1, 13),
8718
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "1").WithArguments("System.Index").WithLocation(1, 13),
8721
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "2").WithArguments("System.Index").WithLocation(1, 16));
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (17)
Diagnostics\DiagnosticTest.cs (1)
2952
case ErrorCode.
ERR_PredefinedTypeNotFound
:
Parsing\ParserErrorMessageTests.cs (3)
4700
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "stackalloc int[1]").WithArguments("System.Span`1").WithLocation(4, 14)
4720
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "stackalloc int[1]").WithArguments("System.Span`1").WithLocation(6, 33)
4783
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "stackalloc int[1]").WithArguments("System.Span`1").WithLocation(6, 39)
Parsing\RecordParsing.cs (4)
2910
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "X").WithArguments("System.Runtime.CompilerServices.IsExternalInit").WithLocation(1, 20),
2913
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "Y").WithArguments("System.Runtime.CompilerServices.IsExternalInit").WithLocation(1, 27));
2923
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "X").WithArguments("System.Runtime.CompilerServices.IsExternalInit").WithLocation(1, 20),
2926
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "Y").WithArguments("System.Runtime.CompilerServices.IsExternalInit").WithLocation(1, 27));
Parsing\StatementAttributeParsingTests.cs (9)
1478
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "await").WithArguments("System.IAsyncDisposable").WithLocation(6, 12),
1481
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "await").WithArguments("System.Threading.Tasks.ValueTask").WithLocation(6, 12),
1565
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "await").WithArguments("System.IAsyncDisposable").WithLocation(6, 12),
1568
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "await").WithArguments("System.Threading.Tasks.ValueTask").WithLocation(6, 12));
5820
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "a..b").WithArguments("System.Range").WithLocation(6, 12),
5823
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "a").WithArguments("System.Index").WithLocation(6, 12),
5829
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "b").WithArguments("System.Index").WithLocation(6, 15));
5922
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "a..").WithArguments("System.Range").WithLocation(6, 12),
5925
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "a").WithArguments("System.Index").WithLocation(6, 12),
Microsoft.CodeAnalysis.CSharp.WinRT.UnitTests (15)
CodeGen\WinMdEventTests.cs (12)
37
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "E").WithArguments("System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken"),
40
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "E").WithArguments("System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken"),
43
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "E").WithArguments("System.Runtime.InteropServices.WindowsRuntime.EventRegistrationTokenTable`1"),
72
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "E").WithArguments("System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken"),
75
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "E").WithArguments("System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken"),
78
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "E").WithArguments("System.Runtime.InteropServices.WindowsRuntime.EventRegistrationTokenTable`1"),
114
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "E").WithArguments("System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken"),
117
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "E").WithArguments("System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken"),
120
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "E").WithArguments("System.Runtime.InteropServices.WindowsRuntime.EventRegistrationTokenTable`1"),
156
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "E").WithArguments("System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken"),
159
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "E").WithArguments("System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken"),
162
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "E").WithArguments("System.Runtime.InteropServices.WindowsRuntime.EventRegistrationTokenTable`1"),
Metadata\WinMdEventTests.cs (3)
3327
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "E").WithArguments("System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken"),
3331
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "E").WithArguments("System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken"),
3336
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "E").WithArguments("System.Runtime.InteropServices.WindowsRuntime.EventRegistrationTokenTable`1"),