252 references to ERR_UnsafeMemberOperation
Microsoft.CodeAnalysis.CSharp (2)
Binder\Binder_Unsafe.cs (1)
112
CallerUnsafeMode.Explicit => forConstructorConstraint ? ErrorCode.ERR_UnsafeConstructorConstraint : ErrorCode.
ERR_UnsafeMemberOperation
,
Errors\ErrorFacts.cs (1)
2576
or ErrorCode.
ERR_UnsafeMemberOperation
Microsoft.CodeAnalysis.CSharp.CSharp15.UnitTests (250)
UnsafeEvolutionTests.cs (250)
2974
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c.M()").WithArguments("C.M()").WithLocation(2, 1));
3035
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "C.M(1)").WithArguments("C.M(int)").WithLocation(2, 1),
3063
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c.M2()").WithArguments("C.M2()").WithLocation(3, 1),
3121
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "123.M1()").WithArguments("E.M1(int)").WithLocation(1, 1),
3124
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "123.M2()").WithArguments("E.extension(int).M2()").WithLocation(2, 1),
3127
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "E.M1(123)").WithArguments("E.M1(int)").WithLocation(3, 1),
3130
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "E.M2(123)").WithArguments("E.M2(int)").WithLocation(4, 1),
3165
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c.M3()").WithArguments("C.M3()").WithLocation(4, 1),
3191
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "&C.M").WithArguments("C.M()").WithLocation(1, 22),
3228
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "C.M").WithArguments("C.M()").WithLocation(1, 8),
3231
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "C.M").WithArguments("C.M()").WithLocation(2, 8),
3266
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "C.M").WithArguments("C.M()").WithLocation(1, 9),
3323
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "C.M()").WithArguments("C.M()").WithLocation(4, 31),
3365
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "F = 0").WithArguments("A.F(int)").WithLocation(3, 4),
3397
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "i.M2()").WithArguments("I.M2()").WithLocation(3, 1),
3428
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "new C().M1()").WithArguments("C.M1()").WithLocation(1, 1),
3539
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "d2.M1()").WithArguments("D2.M1()").WithLocation(2, 20),
3542
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "d2.M2()").WithArguments("D2.M2()").WithLocation(2, 29),
3545
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "d2.M3()").WithArguments("D2.M3()").WithLocation(2, 38),
3548
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "d2.M4()").WithArguments("D2.M4()").WithLocation(2, 47),
3551
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "d2.M5()").WithArguments("D2.M5()").WithLocation(2, 56),
3554
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "d2.M6()").WithArguments("D2.M6()").WithLocation(2, 65),
3557
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "d3.M1()").WithArguments("C.M1()").WithLocation(3, 20),
3560
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "d3.M5()").WithArguments("C.M5()").WithLocation(3, 56),
3563
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c.M1()").WithArguments("C.M1()").WithLocation(4, 11),
3566
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c.M5()").WithArguments("C.M5()").WithLocation(4, 43),
3569
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "base.M1()").WithArguments("C.M1()").WithLocation(14, 31),
3584
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "d2.M1()").WithArguments("D2.M1()").WithLocation(2, 20),
3587
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "d2.M2()").WithArguments("D2.M2()").WithLocation(2, 29),
3590
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "d2.M3()").WithArguments("D2.M3()").WithLocation(2, 38),
3593
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "d2.M4()").WithArguments("D2.M4()").WithLocation(2, 47),
3596
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "d2.M5()").WithArguments("D2.M5()").WithLocation(2, 56),
3599
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "d2.M6()").WithArguments("D2.M6()").WithLocation(2, 65),
3700
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c2.M()").WithArguments("C2.M()").WithLocation(4, 1),
3703
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "b.M()").WithArguments("B.M()").WithLocation(6, 1),
3800
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "i1.M1()").WithArguments("I1.M1()").WithLocation(3, 1),
3803
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "i2.M2()").WithArguments("I2.M2()").WithLocation(7, 1),
3898
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c.M2(null)").WithArguments("B<D>.M2(D)").WithLocation(3, 1),
3960
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c1.M1()").WithArguments("C1.M1()").WithLocation(2, 1),
3963
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "b1.M2()").WithArguments("B1.M2()").WithLocation(6, 1),
3966
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "i.M2()").WithArguments("I.M2()").WithLocation(9, 1),
3984
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c1.M1()").WithArguments("C1.M1()").WithLocation(2, 1),
4023
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c.M2()").WithArguments("C1.M2()").WithLocation(3, 1),
4105
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "await new C()").WithArguments("C.GetAwaiter()").WithLocation(1, 1),
4108
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "await new C()").WithArguments("C.IsCompleted.get").WithLocation(1, 1),
4111
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "await new C()").WithArguments("C.GetResult()").WithLocation(1, 1),
4198
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "new Task()").WithArguments("System.Runtime.CompilerServices.AsyncHelpers.AwaitAwaiter<System.Threading.Tasks.Task>(System.Threading.Tasks.Task)").WithLocation(7, 15));
4262
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "[1, 2, 3]").WithArguments("C.Create(System.ReadOnlySpan<int>)").WithLocation(1, 8),
4265
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "M(1, 2, 3)").WithArguments("C.Create(System.ReadOnlySpan<int>)").WithLocation(2, 1),
4268
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "params C c").WithArguments("C.Create(System.ReadOnlySpan<int>)").WithLocation(3, 15),
4271
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "M3(1, 2, 3)").WithArguments("C.Create(System.ReadOnlySpan<int>)").WithLocation(12, 1),
4346
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "[1, 2, 3]").WithArguments("C.C()").WithLocation(1, 8),
4349
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "M1(1, 2, 3)").WithArguments("C.C()").WithLocation(2, 1),
4352
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "params C c").WithArguments("C.C()").WithLocation(3, 16),
4355
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "M3(1, 2, 3)").WithArguments("C.C()").WithLocation(12, 1),
4387
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "with(0)").WithArguments("C.C(int)").WithLocation(1, 9),
4437
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "1").WithArguments("C.Add(int)").WithLocation(1, 9),
4440
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "2").WithArguments("C.Add(int)").WithLocation(1, 12),
4443
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "3").WithArguments("C.Add(int)").WithLocation(1, 15),
4446
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "1").WithArguments("C.Add(int)").WithLocation(2, 16),
4449
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "2").WithArguments("C.Add(int)").WithLocation(2, 19),
4452
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "3").WithArguments("C.Add(int)").WithLocation(2, 22),
4455
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "new C()").WithArguments("C.Add(int)").WithLocation(3, 12),
4458
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "1").WithArguments("C.Add(int)").WithLocation(4, 22),
4461
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "2").WithArguments("C.Add(int)").WithLocation(4, 25),
4464
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "3").WithArguments("C.Add(int)").WithLocation(4, 28),
4467
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "1").WithArguments("C.Add(int)").WithLocation(5, 4),
4470
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "2").WithArguments("C.Add(int)").WithLocation(5, 7),
4473
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "3").WithArguments("C.Add(int)").WithLocation(5, 10),
4476
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "params C c").WithArguments("C.Add(int)").WithLocation(6, 16),
4479
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "1").WithArguments("C.Add(int)").WithLocation(18, 4),
4482
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "2").WithArguments("C.Add(int)").WithLocation(18, 7),
4485
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "3").WithArguments("C.Add(int)").WithLocation(18, 10),
4516
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "foreach").WithArguments("C.GetEnumerator()").WithLocation(1, 1),
4552
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "..").WithArguments("C.GetEnumerator()").WithLocation(1, 9),
4555
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "..").WithArguments("C.MoveNext()").WithLocation(1, 9),
4558
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "..").WithArguments("C.Current.get").WithLocation(1, 9),
4586
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "foreach").WithArguments("C.MoveNext()").WithLocation(1, 1),
4616
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "foreach").WithArguments("C.Current.get").WithLocation(1, 1),
4643
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "foreach").WithArguments("C.Current.get").WithLocation(1, 1),
4769
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "foreach").WithArguments("System.IDisposable.Dispose()").WithLocation(1, 1),
4772
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "var c = new C()").WithArguments("System.IDisposable.Dispose()").WithLocation(2, 8),
4775
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "..").WithArguments("System.IDisposable.Dispose()").WithLocation(3, 43),
4807
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "foreach (var x in new S()) { }").WithArguments("S.Dispose()").WithLocation(1, 1),
4810
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "var s = new S()").WithArguments("S.Dispose()").WithLocation(2, 8),
4840
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "await foreach (var x in new C()) { }").WithArguments("C.DisposeAsync()").WithLocation(1, 1),
4843
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "var c = new C()").WithArguments("C.DisposeAsync()").WithLocation(2, 14),
4867
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "new C2()").WithArguments("C2.GetPinnableReference()").WithLocation(2, 17),
4908
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "new C()").WithArguments("C.Deconstruct(out int, out int)").WithLocation(1, 14),
4941
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "new System.Threading.Lock()").WithArguments("System.Threading.Lock.EnterScope()").WithLocation(1, 7),
4944
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "new System.Threading.Lock()").WithArguments("System.Threading.Lock.Scope.Dispose()").WithLocation(1, 7),
4974
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "(int x, string y)").WithArguments("System.Runtime.CompilerServices.ITuple.Length.get").WithLocation(2, 10),
4977
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "(int x, string y)").WithArguments("System.Runtime.CompilerServices.ITuple.this[int].get").WithLocation(2, 10),
5009
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "a").WithArguments("C.AppendLiteral(string)").WithLocation(1, 7),
5012
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "{0}").WithArguments("C.AppendFormatted<int>(int)").WithLocation(1, 8),
5015
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, @"$""a{0}""").WithArguments("C.C(int, int)").WithLocation(1, 5),
5055
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "C.M()").WithArguments("C.M()").WithLocation(1, 1),
5089
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "C.M()").WithArguments("C.M()").WithLocation(1, 19),
5120
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "M1()").WithArguments("M1()").WithLocation(1, 1));
5199
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c.P2").WithArguments("C.P2.set").WithLocation(3, 1),
5202
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c.P2").WithArguments("C.P2.get").WithLocation(3, 8)
5229
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c.P").WithArguments("C.P.set").WithLocation(2, 1),
5232
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c.P").WithArguments("C.P.get").WithLocation(2, 1),
5275
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "P1").WithArguments("C.P1.set").WithLocation(3, 5),
5278
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "P3").WithArguments("C.P3.set").WithLocation(5, 5),
5281
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "P1").WithArguments("C.P1.get").WithLocation(10, 5),
5284
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "P2").WithArguments("C.P2.get").WithLocation(11, 5),
5315
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "Length:").WithArguments("C.Length.get").WithLocation(2, 12),
5318
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "[]").WithArguments("C.Length.get").WithLocation(3, 10),
5321
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "[]").WithArguments("C.Length.get").WithLocation(3, 10),
5324
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "[]").WithArguments("C.this[int].get").WithLocation(3, 10),
5360
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "x.P2").WithArguments("E.extension(int).P2.set").WithLocation(3, 1),
5363
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "x.P2").WithArguments("E.extension(int).P2.get").WithLocation(3, 8),
5366
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "E.get_P2(x)").WithArguments("E.get_P2(int)").WithLocation(5, 1),
5369
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "E.set_P2(x, 0)").WithArguments("E.set_P2(int, int)").WithLocation(5, 14),
5397
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c.P2").WithArguments("C.P2.set").WithLocation(2, 1),
5400
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c.P2").WithArguments("C.P2.get").WithLocation(2, 15),
5431
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c.P1").WithArguments("C.P1.get").WithLocation(2, 8),
5434
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c.P2").WithArguments("C.P2.set").WithLocation(3, 1),
5511
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "P2 = 0").WithArguments("A.P2.set").WithLocation(2, 12),
5514
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "P4 = 0").WithArguments("A.P4.set").WithLocation(2, 28),
5517
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "P2 = 0").WithArguments("A.P2.set").WithLocation(6, 16),
5520
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "P4 = 0").WithArguments("A.P4.set").WithLocation(6, 32),
5567
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c.P2").WithArguments("C1.P2.set").WithLocation(3, 1),
5570
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c.P2").WithArguments("C1.P2.get").WithLocation(3, 8),
5573
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c.P3").WithArguments("C1.P3.get").WithLocation(4, 8),
5591
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c.P2").WithArguments("C1.P2.set").WithLocation(3, 1),
5594
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c.P2").WithArguments("C1.P2.get").WithLocation(3, 8),
5597
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c.P3").WithArguments("C1.P3.get").WithLocation(4, 8),
5668
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "i.P1").WithArguments("I.P1.set").WithLocation(2, 1),
5671
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "i.P1").WithArguments("I.P1.get").WithLocation(2, 8),
5674
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "i.P2").WithArguments("I.P2.get").WithLocation(3, 8),
5746
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c2[0]").WithArguments("C2.this[int].set").WithLocation(4, 1),
5749
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c2[0]").WithArguments("C2.this[int].get").WithLocation(4, 9),
5776
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c[0]").WithArguments("C.this[int].set").WithLocation(2, 1),
5779
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c[0]").WithArguments("C.this[int].get").WithLocation(2, 1),
5809
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "[0]").WithArguments("C1.this[int].set").WithLocation(1, 14),
5812
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "[0]").WithArguments("C1.this[int].get").WithLocation(1, 26),
5815
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "[0]").WithArguments("C2.this[int].get").WithLocation(2, 26),
5818
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "[0]").WithArguments("C3.this[int].set").WithLocation(3, 14),
5853
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c1[0]").WithArguments("C1.this[int].get").WithLocation(2, 9),
5856
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c2[0]").WithArguments("C2.this[int].set").WithLocation(4, 1),
5898
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "+=").WithArguments("C.E2.add").WithLocation(3, 6),
5930
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "E3").WithArguments("C.E3").WithLocation(9, 9),
5933
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "E4").WithArguments("C.E4").WithLocation(10, 9),
5936
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "E3").WithArguments("C.E3").WithLocation(14, 9),
5939
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "E4").WithArguments("C.E4").WithLocation(15, 9));
5965
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "+=").WithArguments("C.E1.add").WithLocation(2, 6),
5968
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "-=").WithArguments("C.E2.remove").WithLocation(3, 20),
6024
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "+=").WithArguments("C1.E3.add").WithLocation(4, 6),
6027
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "+=").WithArguments("C1.E4.add").WithLocation(5, 6),
6039
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "+=").WithArguments("C1.E3.add").WithLocation(4, 6),
6042
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "+=").WithArguments("C1.E4.add").WithLocation(5, 6),
6112
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "+=").WithArguments("I.E1.add").WithLocation(2, 6),
6169
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "new C()").WithArguments("C.C()").WithLocation(2, 5),
6172
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "new C3()").WithArguments("C3.C3()").WithLocation(5, 5),
6228
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "new C5()").WithArguments("C5.C5()").WithLocation(5, 5),
6231
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "class C1 : B;").WithArguments("B.B()").WithLocation(10, 1),
6234
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "public C2() { }").WithArguments("B.B()").WithLocation(13, 5),
6237
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, ": base()").WithArguments("B.B()").WithLocation(14, 22),
6240
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "B()").WithArguments("B.B()").WithLocation(16, 14),
6244
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, @"[System.Diagnostics.CodeAnalysis.RequiresUnsafe]
6248
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, ": base()").WithArguments("B.B()").WithLocation(31, 22),
6254
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "new C5()").WithArguments("C5.C5()").WithLocation(5, 5),
6278
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, ": this(0)").WithArguments("C.C(int)").WithLocation(7, 19),
6281
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, ": this(0)").WithArguments("C.C(int)").WithLocation(9, 23));
6332
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "A").WithArguments("A.A()").WithLocation(2, 2),
6410
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "new C()").WithArguments("C.C()").WithLocation(1, 9),
6744
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c - c").WithArguments("C.operator -(C, C)").WithLocation(3, 5),
6780
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c - c").WithArguments("E.extension(C).operator -(C, C)").WithLocation(3, 5),
6783
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "E.op_Subtraction(c, c)").WithArguments("E.op_Subtraction(C, C)").WithLocation(5, 1),
6812
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c -= c").WithArguments("C.operator -=(C)").WithLocation(3, 1),
6848
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c -= c").WithArguments("E.extension(C).operator -=(C)").WithLocation(3, 1),
6851
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "E.op_SubtractionAssignment(c, c)").WithArguments("E.op_SubtractionAssignment(C, C)").WithLocation(5, 1),
6880
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c--").WithArguments("C.operator --()").WithLocation(3, 1),
6909
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c").WithArguments("C.implicit operator string(C)").WithLocation(3, 12),
7011
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "C.M()").WithArguments("C.M()").WithLocation(5, 14),
8047
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c.M2()").WithArguments("C.M2()").WithLocation(3, 1),
8050
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "C.M3()").WithArguments("C.M3()").WithLocation(4, 1),
8053
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c.M4()").WithArguments("C.M4()").WithLocation(5, 1),
8144
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c.M()").WithArguments("C.M()").WithLocation(2, 1))
8209
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c.M()").WithArguments("C.M()").WithLocation(2, 1),
8290
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "d3.M1()").WithArguments("D3.M1()").WithLocation(4, 20),
8293
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "d3.M2()").WithArguments("D3.M2()").WithLocation(4, 29),
8296
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "d3.M3()").WithArguments("D3.M3()").WithLocation(4, 38),
8299
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "d3.M4()").WithArguments("D3.M4()").WithLocation(4, 47),
8302
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "d3.M5()").WithArguments("D3.M5()").WithLocation(4, 56),
8305
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "d3.M6()").WithArguments("D3.M6()").WithLocation(4, 65),
8308
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "d4.M1()").WithArguments("C.M1()").WithLocation(5, 20),
8311
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "d4.M2()").WithArguments("C.M2()").WithLocation(5, 29),
8314
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "d4.M3()").WithArguments("B.M3()").WithLocation(5, 38),
8317
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "d4.M4()").WithArguments("C.M4()").WithLocation(5, 47),
8320
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "d4.M5()").WithArguments("C.M5()").WithLocation(5, 56),
8323
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c.M1()").WithArguments("C.M1()").WithLocation(6, 11),
8326
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c.M2()").WithArguments("C.M2()").WithLocation(6, 19),
8329
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c.M3()").WithArguments("B.M3()").WithLocation(6, 27),
8332
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c.M4()").WithArguments("C.M4()").WithLocation(6, 35),
8335
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c.M5()").WithArguments("C.M5()").WithLocation(6, 43),
8341
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "base.M1()").WithArguments("C.M1()").WithLocation(24, 31),
8344
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "base.M2()").WithArguments("C.M2()").WithLocation(24, 42),
8347
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "base.M3()").WithArguments("B.M3()").WithLocation(24, 53),
8350
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "base.M4()").WithArguments("C.M4()").WithLocation(24, 64),
8353
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "base.M5()").WithArguments("C.M5()").WithLocation(24, 75),
8365
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "d3.M1()").WithArguments("D3.M1()").WithLocation(4, 20),
8368
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "d3.M2()").WithArguments("D3.M2()").WithLocation(4, 29),
8371
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "d3.M3()").WithArguments("D3.M3()").WithLocation(4, 38),
8374
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "d3.M4()").WithArguments("D3.M4()").WithLocation(4, 47),
8377
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "d3.M5()").WithArguments("D3.M5()").WithLocation(4, 56),
8380
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "d3.M6()").WithArguments("D3.M6()").WithLocation(4, 65),
8383
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "d4.M1()").WithArguments("C.M1()").WithLocation(5, 20),
8386
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "d4.M2()").WithArguments("C.M2()").WithLocation(5, 29),
8389
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "d4.M4()").WithArguments("C.M4()").WithLocation(5, 47),
8392
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "d4.M5()").WithArguments("C.M5()").WithLocation(5, 56),
8395
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c.M1()").WithArguments("C.M1()").WithLocation(6, 11),
8398
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c.M2()").WithArguments("C.M2()").WithLocation(6, 19),
8401
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c.M4()").WithArguments("C.M4()").WithLocation(6, 35),
8404
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c.M5()").WithArguments("C.M5()").WithLocation(6, 43),
8413
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "base.M1()").WithArguments("C.M1()").WithLocation(24, 31),
8416
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "base.M2()").WithArguments("C.M2()").WithLocation(24, 42),
8419
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "base.M4()").WithArguments("C.M4()").WithLocation(24, 64),
8422
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "base.M5()").WithArguments("C.M5()").WithLocation(24, 75),
8503
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "i.M1()").WithArguments("I.M1()").WithLocation(3, 1),
8624
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c.P2").WithArguments("C.P2.set").WithLocation(3, 1),
8627
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "C.P3").WithArguments("C.P3.set").WithLocation(4, 1),
8630
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c.P4").WithArguments("C.P4.set").WithLocation(5, 1),
8738
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c.P").WithArguments("C.P.set").WithLocation(2, 1))
8808
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c.P1").WithArguments("C.P1.set").WithLocation(2, 1),
8811
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c.P2").WithArguments("C.P2.set").WithLocation(3, 1),
8837
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c[0]").WithArguments("C.this[int].set").WithLocation(2, 1),
8840
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c[0]").WithArguments("C.this[int].get").WithLocation(2, 8),
8933
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c[0]").WithArguments("C.this[int].set").WithLocation(2, 1),
8936
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c[0]").WithArguments("C.this[int].get").WithLocation(2, 8))
9013
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "new C1()[0]").WithArguments("C1.this[int].set").WithLocation(1, 1),
9016
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "new C2()[0]").WithArguments("C2.this[int].set").WithLocation(2, 1),
9042
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "+=").WithArguments("C.E.add").WithLocation(1, 5),
9134
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "+=").WithArguments("C.E.add").WithLocation(1, 5))
9197
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "+=").WithArguments("C.E.add").WithLocation(1, 5),
9200
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "-=").WithArguments("C.E.remove").WithLocation(2, 5),
9225
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "new C()").WithArguments("C.C()").WithLocation(1, 5),
9304
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "new C(null)").WithArguments("C.C(int*)").WithLocation(1, 5))
9368
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "new C()").WithArguments("C.C()").WithLocation(1, 5),
9394
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c += c").WithArguments("C.operator +=(C)").WithLocation(2, 1),
9474
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c += null").WithArguments("C.operator +=(int*)").WithLocation(2, 1))
9539
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c += null").WithArguments("C.operator +=(C)").WithLocation(2, 1),
9879
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "new C().M()").WithArguments("C.M()").WithLocation(1, 1));
9942
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "new C().M()").WithArguments("C.M()").WithLocation(1, 1));
10036
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "A.M()").WithArguments("A.M()").WithLocation(1, 1));
10084
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "A.M()").WithArguments("A.M()").WithLocation(1, 1));
10258
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c.M1()").WithArguments("C.M1()").WithLocation(2, 1),
10261
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c.M2()").WithArguments("C.M2()").WithLocation(3, 1),