493 references to ERR_PredefinedTypeNotFound
Microsoft.CodeAnalysis.CSharp (2)
Errors\ErrorFacts.cs (1)
556
case ErrorCode.
ERR_PredefinedTypeNotFound
:
Symbols\MissingMetadataTypeSymbol.cs (1)
323
new CSDiagnosticInfo(ErrorCode.
ERR_PredefinedTypeNotFound
, MetadataHelpers.BuildQualifiedName(_namespaceName, MetadataName)) :
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (28)
CodeGen\CodeGenAsyncTests.cs (3)
3316
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "{}").WithArguments("System.Runtime.CompilerServices.AsyncVoidMethodBuilder").WithLocation(4, 20),
3344
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "{}").WithArguments("System.Runtime.CompilerServices.AsyncTaskMethodBuilder").WithLocation(4, 20),
3375
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)
736
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)
2460
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "{ yield return 42; }").WithArguments("System.Collections.Generic.IEnumerable`1").WithLocation(31, 57),
2508
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 (8)
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));
1570
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "in object p").WithArguments("System.Runtime.InteropServices.InAttribute").WithLocation(9, 32));
1591
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "ref readonly object").WithArguments("System.Runtime.InteropServices.InAttribute").WithLocation(10, 20));
1612
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "in int p").WithArguments("System.Runtime.InteropServices.InAttribute").WithLocation(11, 24));
1633
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "ref readonly int").WithArguments("System.Runtime.InteropServices.InAttribute").WithLocation(11, 17));
4471
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "ref readonly int").WithArguments("System.Runtime.InteropServices.InAttribute").WithLocation(4, 12));
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (133)
Attributes\AttributeTests_Embedded.cs (20)
322
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
).WithArguments("System.Attribute").WithLocation(1, 1),
324
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
).WithArguments("System.Attribute").WithLocation(1, 1),
326
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
).WithArguments("System.Attribute").WithLocation(1, 1),
363
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "Attribute").WithArguments("System.Object").WithLocation(4, 18),
366
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "ValueType").WithArguments("System.Object").WithLocation(11, 18),
369
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "Void").WithArguments("System.Object").WithLocation(14, 18),
372
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "Test").WithArguments("System.Object").WithLocation(18, 14),
375
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "object").WithArguments("System.Object").WithLocation(20, 24),
378
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "object").WithArguments("System.Object").WithLocation(20, 12),
381
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "AttributeTargets").WithArguments("System.Object").WithLocation(7, 40),
424
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "set;").WithArguments("System.Void").WithLocation(8, 42),
427
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "set;").WithArguments("System.Void").WithLocation(9, 38),
430
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "public AttributeUsageAttribute(AttributeTargets t) { }").WithArguments("System.Void").WithLocation(7, 9),
433
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "Attribute").WithArguments("System.Void").WithLocation(4, 18),
436
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "ValueType").WithArguments("System.Void").WithLocation(11, 18),
439
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "Test").WithArguments("System.Void").WithLocation(18, 14),
442
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "AttributeUsageAttribute").WithArguments("System.Void").WithLocation(7, 16),
444
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
).WithArguments("System.Void").WithLocation(1, 1),
446
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
).WithArguments("System.Void").WithLocation(1, 1),
448
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)
1178
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "nint n").WithArguments("System.Runtime.CompilerServices.NativeIntegerAttribute").WithLocation(5, 19),
1181
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "=>").WithArguments("System.Runtime.CompilerServices.NativeIntegerAttribute").WithLocation(7, 29));
1202
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "nint n").WithArguments("System.Runtime.CompilerServices.NativeIntegerAttribute").WithLocation(5, 17),
1205
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),
Emit\UnmanagedTypeModifierTests.cs (10)
365
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "unmanaged").WithArguments("System.Runtime.InteropServices.UnmanagedType").WithLocation(8, 25));
386
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "unmanaged").WithArguments("System.Runtime.InteropServices.UnmanagedType").WithLocation(10, 34));
406
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "unmanaged").WithArguments("System.Runtime.InteropServices.UnmanagedType").WithLocation(10, 39));
438
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "unmanaged").WithArguments("System.Runtime.InteropServices.UnmanagedType").WithLocation(16, 31));
465
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "unmanaged").WithArguments("System.ValueType").WithLocation(15, 25));
493
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "unmanaged").WithArguments("System.ValueType").WithLocation(17, 34));
520
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "unmanaged").WithArguments("System.ValueType").WithLocation(17, 39));
556
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "Int32").WithArguments("System.ValueType").WithLocation(6, 19),
559
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "unmanaged").WithArguments("System.ValueType").WithLocation(20, 31));
1099
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "unmanaged").WithArguments("System.Runtime.InteropServices.UnmanagedType").WithLocation(2, 32));
Semantics\PatternMatchingTests.cs (4)
7317
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "new System.NullReferenceException()").WithArguments("System.Exception").WithLocation(7, 21),
7320
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "null").WithArguments("System.Exception").WithLocation(8, 21),
7323
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "null").WithArguments("System.Exception").WithLocation(10, 15),
7326
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "d").WithArguments("System.Exception").WithLocation(11, 27)
Semantics\PatternMatchingTests_ListPatterns.cs (14)
3714
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "[var item, ..var slice]").WithArguments("System.Index").WithLocation(7, 25),
3717
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "..var slice").WithArguments("System.Range").WithLocation(7, 36)
5338
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, ".._").WithArguments("System.Range").WithLocation(7, 22)
5502
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "..var rest").WithArguments("System.Range").WithLocation(10, 32),
5508
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "1..^1").WithArguments("System.Range").WithLocation(12, 18)
5823
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "[_]").WithArguments("System.Index").WithLocation(5, 5),
5832
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "[ _, _, .. ]").WithArguments("System.Index").WithLocation(13, 5),
5841
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "[_, _]").WithArguments("System.Index").WithLocation(20, 5),
5847
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "[_, _, ..]").WithArguments("System.Index").WithLocation(21, 5),
5853
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "[_, _]").WithArguments("System.Index").WithLocation(28, 5),
7877
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "[var x]").WithArguments("System.Index").WithLocation(12, 21),
7883
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "[.. var y]").WithArguments("System.Index").WithLocation(12, 40),
7889
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, ".. var y").WithArguments("System.Range").WithLocation(12, 41),
8207
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "[var x]").WithArguments("System.Index").WithLocation(2, 16),
Semantics\PatternMatchingTests2.cs (4)
3291
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
).WithArguments("System.Int32").WithLocation(1, 1),
3294
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, @"switch (s)
3307
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, @"switch (s)
3320
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, @"case not ""one"" when b1:").WithArguments("System.Int32").WithLocation(8, 13)
Semantics\PatternMatchingTests4.cs (1)
159
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),
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),
2593
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "0").WithArguments("System.Int32").WithLocation(5, 27),
2596
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "0").WithArguments("System.Int32").WithLocation(14, 24),
2599
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "9").WithArguments("System.Int32").WithLocation(14, 40),
2640
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "void").WithArguments("System.Void").WithLocation(4, 12),
2643
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "bool").WithArguments("System.Boolean").WithLocation(9, 20),
2646
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "bool?").WithArguments("System.Nullable`1").WithLocation(9, 20),
2649
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "void").WithArguments("System.Void").WithLocation(9, 12),
2652
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "P").WithArguments("System.Object").WithLocation(2, 7),
2655
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "M2").WithArguments("System.Object").WithLocation(6, 19),
2696
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "P").WithArguments("System.Object").WithLocation(2, 7),
2699
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "P").WithArguments("System.Object").WithLocation(4, 12),
2702
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "bool").WithArguments("System.Boolean").WithLocation(9, 7),
2705
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "bool?").WithArguments("System.Nullable`1").WithLocation(9, 7),
2708
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, @"P(bool? x = null)
2713
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "P").WithArguments("System.Object").WithLocation(6, 30),
2765
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "int").WithArguments("System.Int32").WithLocation(4, 13),
2768
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "int").WithArguments("System.Int32").WithLocation(5, 12),
2771
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "int").WithArguments("System.Int32").WithLocation(5, 21),
2774
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "int").WithArguments("System.Int32").WithLocation(5, 28),
2777
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "int?").WithArguments("System.Nullable`1").WithLocation(5, 28),
2780
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "set { _number = value; }").WithArguments("System.Void").WithLocation(8, 9),
2783
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "void").WithArguments("System.Void").WithLocation(11, 5),
2786
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "P").WithArguments("System.Object").WithLocation(2, 7),
2789
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "0").WithArguments("System.Int32").WithLocation(4, 27),
2792
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "0").WithArguments("System.Int32").WithLocation(13, 24),
2795
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "9").WithArguments("System.Int32").WithLocation(13, 40),
3807
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "int").WithArguments("System.Int32").WithLocation(4, 13),
3810
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "int").WithArguments("System.Int32").WithLocation(5, 12),
3813
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "int").WithArguments("System.Int32").WithLocation(5, 21),
3816
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "int").WithArguments("System.Int32").WithLocation(5, 28),
3819
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "int?").WithArguments("System.Nullable`1").WithLocation(5, 28),
3822
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "set { _number = value; }").WithArguments("System.Void").WithLocation(8, 9),
3825
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "P").WithArguments("System.Object").WithLocation(11, 5),
3828
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "P").WithArguments("System.Object").WithLocation(2, 7),
3831
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "0").WithArguments("System.Int32").WithLocation(5, 37),
3834
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "0").WithArguments("System.Int32").WithLocation(4, 27),
3837
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "P").WithArguments("System.Object").WithLocation(13, 30),
3840
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "0").WithArguments("System.Int32").WithLocation(13, 37),
3843
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "1").WithArguments("System.Int32").WithLocation(13, 42),
3846
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "P").WithArguments("System.Void").WithLocation(13, 30),
3902
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "int").WithArguments("System.Int32").WithLocation(4, 13),
3905
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "int").WithArguments("System.Int32").WithLocation(5, 12),
3908
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "int").WithArguments("System.Int32").WithLocation(5, 21),
3911
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "int").WithArguments("System.Int32").WithLocation(5, 28),
3914
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "int?").WithArguments("System.Nullable`1").WithLocation(5, 28),
3917
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "set { _number = value; }").WithArguments("System.Void").WithLocation(8, 9),
3920
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "P").WithArguments("System.Object").WithLocation(11, 5),
3923
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "P").WithArguments("System.Object").WithLocation(2, 7),
3926
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "0").WithArguments("System.Int32").WithLocation(4, 27),
3929
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "P").WithArguments("System.Object").WithLocation(13, 30),
3932
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "0").WithArguments("System.Int32").WithLocation(13, 37),
3935
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "1").WithArguments("System.Int32").WithLocation(13, 42),
3938
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 (185)
Semantics\DelegateTypeTests.cs (10)
2298
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "Main").WithArguments("System.Action").WithLocation(6, 13),
2304
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "() => 1").WithArguments("System.Func`1").WithLocation(7, 13));
2473
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "() => 1").WithArguments("System.Linq.Expressions.Expression`1").WithLocation(5, 48));
2806
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
).WithArguments("System.IntPtr").WithLocation(1, 1),
2809
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "(ref int i) => i").WithArguments("System.IntPtr").WithLocation(6, 13));
2842
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
).WithArguments("System.IntPtr").WithLocation(1, 1),
2845
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "(int* p) => p").WithArguments("System.IntPtr").WithLocation(6, 13));
2878
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
).WithArguments("System.MulticastDelegate").WithLocation(1, 1));
15151
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "1.0").WithArguments("System.Double").WithLocation(1, 24),
15157
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "2m").WithArguments("System.Decimal").WithLocation(2, 24));
Semantics\ForEachTests.cs (1)
2292
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)
676
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "0..2").WithArguments("System.Range").WithLocation(4, 31));
815
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "^arg").WithArguments("System.Index").WithLocation(6, 17));
1018
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "1..2").WithArguments("System.Range").WithLocation(6, 17),
1021
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "1..").WithArguments("System.Range").WithLocation(7, 17),
1024
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "..2").WithArguments("System.Range").WithLocation(8, 17),
1027
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "..").WithArguments("System.Range").WithLocation(9, 17));
1219
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "arg..arg").WithArguments("System.Boolean").WithLocation(25, 17));
Semantics\InitOnlyMemberTests.cs (4)
773
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "init").WithArguments("System.Runtime.CompilerServices.IsExternalInit").WithLocation(4, 49)
4708
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "init").WithArguments("System.Runtime.CompilerServices.IsExternalInit").WithLocation(4, 32)
4718
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "init").WithArguments("System.Runtime.CompilerServices.IsExternalInit").WithLocation(4, 32)
4729
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "init").WithArguments("System.Runtime.CompilerServices.IsExternalInit").WithLocation(4, 32)
Semantics\InterpolationTests.cs (2)
883
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, @"$""test""").WithArguments("System.Runtime.CompilerServices.FormattableStringFactory").WithLocation(5, 26)
4406
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, @"$""Literal{1}""").WithArguments("System.Boolean").WithLocation(1, 19)
Semantics\NativeIntegerTests.cs (11)
686
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "nint").WithArguments("System.IntPtr").WithLocation(3, 30),
692
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "nuint").WithArguments("System.UIntPtr").WithLocation(4, 31)
899
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "F1").WithArguments("System.IntPtr").WithLocation(5, 13),
902
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "F2").WithArguments("System.UIntPtr").WithLocation(6, 13));
969
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "nint").WithArguments("System.IntPtr").WithLocation(3, 19),
972
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "nuint").WithArguments("System.UIntPtr").WithLocation(4, 19));
1016
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "F1").WithArguments("System.IntPtr").WithLocation(5, 13),
1019
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "F2").WithArguments("System.UIntPtr").WithLocation(6, 13));
1165
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "C").WithArguments("System.Void").WithLocation(1, 7),
1168
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "B").WithArguments("System.IntPtr").WithLocation(1, 11),
1240
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "B").WithArguments("System.Void").WithLocation(1, 7),
Semantics\NullableReferenceTypesTests.cs (14)
8710
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "E").WithArguments("System.Int32").WithLocation(1, 6),
8713
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "int").WithArguments("System.Int32").WithLocation(4, 5),
8716
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "int").WithArguments("System.Int32").WithLocation(4, 17));
8746
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "T?").WithArguments("System.Nullable`1").WithLocation(6, 9)
8759
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "T?").WithArguments("System.Nullable`1").WithLocation(4, 12)
8772
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "T?").WithArguments("System.Nullable`1").WithLocation(4, 27),
8775
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "U").WithArguments("System.Nullable`1").WithLocation(4, 12)
112964
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
).WithArguments("System.Attribute").WithLocation(1, 1),
112966
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
).WithArguments("System.Attribute").WithLocation(1, 1),
112974
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
).WithArguments("System.Attribute").WithLocation(1, 1),
112976
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
).WithArguments("System.Byte").WithLocation(1, 1),
112984
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
).WithArguments("System.Attribute").WithLocation(1, 1),
112986
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
).WithArguments("System.Int32").WithLocation(1, 1),
112994
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
).WithArguments("System.Byte").WithLocation(1, 1));
Semantics\PrimaryConstructorTests.cs (2)
7372
diagnosticsToCheck.Where(d => d.Code is (int)ErrorCode.
ERR_PredefinedTypeNotFound
).Any())
7377
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "p1").WithArguments("System.Runtime.CompilerServices.IsExternalInit").WithLocation(1000, 1)
Semantics\RawInterpolationTests.cs (1)
897
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, @"$""""""test""""""").WithArguments("System.Runtime.CompilerServices.FormattableStringFactory").WithLocation(5, 26));
Semantics\RawInterpolationTests_Handler.cs (1)
2709
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)
4137
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "A").WithArguments("System.IEquatable`1").WithLocation(2, 15),
4140
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "A").WithArguments("System.IEquatable`1").WithLocation(2, 15)
4376
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, @"record struct A
4385
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, @"record struct A
4394
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "A").WithArguments("System.Boolean").WithLocation(2, 15),
4397
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "A").WithArguments("System.Boolean").WithLocation(2, 15),
4400
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "A").WithArguments("System.Boolean").WithLocation(2, 15),
4403
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "A").WithArguments("System.Boolean").WithLocation(2, 15),
4406
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "bool").WithArguments("System.Boolean").WithLocation(4, 12),
5181
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "record struct C1;").WithArguments("System.Text.StringBuilder").WithLocation(2, 1),
5187
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "C1").WithArguments("System.Text.StringBuilder").WithLocation(2, 15)
Semantics\RecordTests.cs (65)
5149
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "record C1;").WithArguments("System.Text.StringBuilder").WithLocation(2, 1),
5155
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "C1").WithArguments("System.Text.StringBuilder").WithLocation(2, 8)
16300
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "A").WithArguments("System.Type").WithLocation(2, 15),
16303
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, @"public record A {
16307
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, @"public record A {
16311
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, @"public record A {
16314
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
).WithArguments("System.Attribute").WithLocation(1, 1),
16316
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
).WithArguments("System.Attribute").WithLocation(1, 1),
16318
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
).WithArguments("System.Byte").WithLocation(1, 1),
16326
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
).WithArguments("System.Attribute").WithLocation(1, 1),
16328
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
).WithArguments("System.Byte").WithLocation(1, 1),
17249
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, @"public record A {
17254
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, @"public record A {
17259
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "A").WithArguments("System.Type").WithLocation(2, 15),
17261
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
).WithArguments("System.Attribute").WithLocation(1, 1),
17263
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
).WithArguments("System.Attribute").WithLocation(1, 1),
17265
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
).WithArguments("System.Byte").WithLocation(1, 1),
17273
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
).WithArguments("System.Attribute").WithLocation(1, 1),
17275
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
).WithArguments("System.Byte").WithLocation(1, 1),
17345
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, @"public record A {
17350
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, @"public record A {
17355
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "A").WithArguments("System.Type").WithLocation(2, 15),
17357
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
).WithArguments("System.Attribute").WithLocation(1, 1),
17359
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
).WithArguments("System.Attribute").WithLocation(1, 1),
17361
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
).WithArguments("System.Byte").WithLocation(1, 1),
17369
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
).WithArguments("System.Attribute").WithLocation(1, 1),
17371
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
).WithArguments("System.Byte").WithLocation(1, 1),
17441
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "A").WithArguments("System.Type").WithLocation(2, 15),
17444
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, @"public record A {
17448
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, @"public record A {
17452
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, @"public record A {
17455
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
).WithArguments("System.Attribute").WithLocation(1, 1),
17457
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
).WithArguments("System.Attribute").WithLocation(1, 1),
17459
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
).WithArguments("System.Byte").WithLocation(1, 1),
17467
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
).WithArguments("System.Attribute").WithLocation(1, 1),
17469
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
).WithArguments("System.Byte").WithLocation(1, 1),
18514
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, @"record A
18523
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, @"record A
18532
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, @"record A
18541
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, @"record A
18550
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "A").WithArguments("System.Boolean").WithLocation(2, 8),
18553
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "A").WithArguments("System.Boolean").WithLocation(2, 8),
18556
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "A").WithArguments("System.Boolean").WithLocation(2, 8),
18559
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "A").WithArguments("System.Boolean").WithLocation(2, 8),
18562
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "bool").WithArguments("System.Boolean").WithLocation(4, 20),
19178
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "A").WithArguments("System.Type").WithLocation(2, 8)
24297
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "A").WithArguments("System.IEquatable`1").WithLocation(1, 8),
24300
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "A").WithArguments("System.IEquatable`1").WithLocation(1, 8),
24303
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "A").WithArguments("System.Type").WithLocation(1, 8),
24306
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "B").WithArguments("System.IEquatable`1").WithLocation(2, 8),
24309
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "B").WithArguments("System.IEquatable`1").WithLocation(2, 8),
24312
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "B").WithArguments("System.Type").WithLocation(2, 8)
24362
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "A").WithArguments("System.IEquatable`1").WithLocation(1, 8),
24365
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "A").WithArguments("System.IEquatable`1").WithLocation(1, 8),
24368
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "A").WithArguments("System.Type").WithLocation(1, 8),
24374
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "B").WithArguments("System.IEquatable`1").WithLocation(2, 8),
24377
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "B").WithArguments("System.IEquatable`1").WithLocation(2, 8),
24380
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "B").WithArguments("System.Type").WithLocation(2, 8),
24436
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "A").WithArguments("System.IEquatable`1").WithLocation(2, 8),
24439
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "A").WithArguments("System.IEquatable`1").WithLocation(2, 8),
24442
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "A").WithArguments("System.Type").WithLocation(2, 8),
24448
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "B").WithArguments("System.IEquatable`1").WithLocation(3, 8),
24451
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "B").WithArguments("System.IEquatable`1").WithLocation(3, 8),
24454
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "B").WithArguments("System.Type").WithLocation(3, 8),
24517
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "A").WithArguments("System.Type").WithLocation(1, 8),
Semantics\RefFieldTests.cs (2)
9433
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "init").WithArguments("System.Runtime.CompilerServices.IsExternalInit").WithLocation(6, 28),
9504
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)
1243
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "stackalloc int [3] { 1, 2, 3 }").WithArguments("System.Span`1").WithLocation(6, 24),
1249
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "stackalloc int [ ] { 1, 2, 3 }").WithArguments("System.Span`1").WithLocation(7, 24),
1255
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)
7437
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "return").WithArguments("System.Object").WithLocation(1, 1),
7439
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
).WithArguments("System.Void").WithLocation(1, 1),
7441
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
).WithArguments("System.String").WithLocation(1, 1),
7456
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
).WithArguments("System.Threading.Tasks.Task").WithLocation(1, 1),
7483
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
).WithArguments("System.Int32").WithLocation(1, 1),
7486
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "10").WithArguments("System.Int32").WithLocation(3, 8)
7505
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
).WithArguments("System.Int32").WithLocation(1, 1),
7515
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "await System.Threading.Tasks.Task.Factory.StartNew(() => 5L);").WithArguments("System.Int32").WithLocation(2, 1),
7518
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "await System.Threading.Tasks.Task.Factory.StartNew(() => 5L);").WithArguments("System.Int32").WithLocation(2, 1),
7521
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "await System.Threading.Tasks.Task.Factory.StartNew(() => 5L);").WithArguments("System.Int32").WithLocation(2, 1),
7524
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "11").WithArguments("System.Int32").WithLocation(3, 8)
7543
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
).WithArguments("System.Threading.Tasks.Task`1").WithLocation(1, 1),
7570
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
).WithArguments("System.Threading.Tasks.Task`1").WithLocation(1, 1),
7572
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
).WithArguments("System.Int32").WithLocation(1, 1),
7582
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "11").WithArguments("System.Int32").WithLocation(3, 8)
7599
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
).WithArguments("System.String").WithLocation(1, 1)
Semantics\UseSiteErrorTests.cs (15)
1216
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "C").WithArguments("System.Object"),
1219
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "int").WithArguments("System.Int32"),
1222
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "set;").WithArguments("System.Void"),
1307
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "SecurityAction").WithArguments("System.Int32"));
1311
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "SecurityAction").WithArguments("System.Int32"));
1356
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "SecurityAction").WithArguments("System.Int32"));
1360
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "SecurityAction").WithArguments("System.Int32"));
1388
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "SecurityAction").WithArguments("System.Int32"));
1392
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "SecurityAction").WithArguments("System.Int32"));
1471
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "SecurityAction").WithArguments("System.Int32"));
1477
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "SecurityAction").WithArguments("System.Int32"));
1525
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "SecurityAction").WithArguments("System.Int32"));
1532
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "SecurityAction").WithArguments("System.Int32"));
1578
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "SecurityAction").WithArguments("System.Int32"));
1584
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "SecurityAction").WithArguments("System.Int32"));
Semantics\UsingStatementTests.cs (1)
1802
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "using").WithArguments("System.IDisposable").WithLocation(11, 9),
Semantics\Utf8StringsLiteralsTests.cs (7)
1920
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, @"""hello""u8").WithArguments("System.Byte").WithLocation(7, 13)
1925
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, @"""hello""u8").WithArguments("System.Byte").WithLocation(7, 13)
1948
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, @"""hello""u8").WithArguments("System.Int32").WithLocation(7, 13),
1951
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, @"""hello""u8").WithArguments("System.Int32").WithLocation(7, 13),
1954
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, @"""hello""u8").WithArguments("System.Int32").WithLocation(7, 13)
1976
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, @"""hello""u8").WithArguments("System.ReadOnlySpan`1").WithLocation(7, 13)
1981
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, @"""hello""u8").WithArguments("System.ReadOnlySpan`1").WithLocation(7, 13)
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (33)
Symbols\DefaultInterfaceImplementationTests.cs (2)
67684
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "string").WithArguments("System.String").WithLocation(6, 22),
67712
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "string").WithArguments("System.String").WithLocation(6, 22),
Symbols\FunctionPointerTypeSymbolTests.cs (2)
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));
Symbols\GenericConstraintTests.cs (7)
5744
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "A").WithArguments("System.Object").WithLocation(1, 7),
5747
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "B").WithArguments("System.Object").WithLocation(2, 7),
5772
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "A").WithArguments("System.Object").WithLocation(2, 16),
5775
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "S").WithArguments("System.ValueType").WithLocation(1, 8),
5778
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "void").WithArguments("System.Void").WithLocation(4, 23),
5781
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "void").WithArguments("System.Void").WithLocation(8, 23),
5787
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 (3)
8603
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "Test").WithArguments("System.Object"),
8606
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "int").WithArguments("System.Int32"),
8609
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "1").WithArguments("System.Int32"),
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (20)
Diagnostics\DiagnosticTest.cs (1)
2914
case ErrorCode.
ERR_PredefinedTypeNotFound
:
Parsing\ParserErrorMessageTests.cs (3)
4861
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "stackalloc int[1]").WithArguments("System.Span`1").WithLocation(4, 14)
4881
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "stackalloc int[1]").WithArguments("System.Span`1").WithLocation(6, 33)
4944
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "stackalloc int[1]").WithArguments("System.Span`1").WithLocation(6, 39)
Parsing\RecordParsing.cs (4)
2760
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "X").WithArguments("System.Runtime.CompilerServices.IsExternalInit").WithLocation(1, 20),
2763
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "Y").WithArguments("System.Runtime.CompilerServices.IsExternalInit").WithLocation(1, 27));
2773
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "X").WithArguments("System.Runtime.CompilerServices.IsExternalInit").WithLocation(1, 20),
2776
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "Y").WithArguments("System.Runtime.CompilerServices.IsExternalInit").WithLocation(1, 27));
Parsing\StatementAttributeParsingTests.cs (12)
1477
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "await").WithArguments("System.IAsyncDisposable").WithLocation(6, 12),
1480
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "await").WithArguments("System.Threading.Tasks.ValueTask").WithLocation(6, 12),
1564
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "await").WithArguments("System.IAsyncDisposable").WithLocation(6, 12),
1567
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "await").WithArguments("System.Threading.Tasks.ValueTask").WithLocation(6, 12));
5805
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "a..b").WithArguments("System.Range").WithLocation(6, 12),
5808
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "a").WithArguments("System.Index").WithLocation(6, 12),
5814
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "b").WithArguments("System.Index").WithLocation(6, 15));
5907
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "a..").WithArguments("System.Range").WithLocation(6, 12),
5910
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "a").WithArguments("System.Index").WithLocation(6, 12),
6006
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "..b").WithArguments("System.Range").WithLocation(6, 12),
6012
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "b").WithArguments("System.Index").WithLocation(6, 14));
6101
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "..").WithArguments("System.Range").WithLocation(6, 12),
Microsoft.CodeAnalysis.CSharp.WinRT.UnitTests (15)
CodeGen\WinMdEventTests.cs (12)
36
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "E").WithArguments("System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken"),
39
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "E").WithArguments("System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken"),
42
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "E").WithArguments("System.Runtime.InteropServices.WindowsRuntime.EventRegistrationTokenTable`1"),
71
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "E").WithArguments("System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken"),
74
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "E").WithArguments("System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken"),
77
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "E").WithArguments("System.Runtime.InteropServices.WindowsRuntime.EventRegistrationTokenTable`1"),
113
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "E").WithArguments("System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken"),
116
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "E").WithArguments("System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken"),
119
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "E").WithArguments("System.Runtime.InteropServices.WindowsRuntime.EventRegistrationTokenTable`1"),
155
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "E").WithArguments("System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken"),
158
Diagnostic(ErrorCode.
ERR_PredefinedTypeNotFound
, "E").WithArguments("System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken"),
161
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"),