245 references to ERR_UnsafeMemberOperation
Microsoft.CodeAnalysis.CSharp (2)
Binder\Binder_Unsafe.cs (1)
32
CallerUnsafeMode.Explicit => ErrorCode.
ERR_UnsafeMemberOperation
,
Errors\ErrorFacts.cs (1)
2575
or ErrorCode.
ERR_UnsafeMemberOperation
Microsoft.CodeAnalysis.CSharp.CSharp15.UnitTests (243)
UnsafeEvolutionTests.cs (243)
2790
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c.M()").WithArguments("C.M()").WithLocation(2, 1));
2844
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "C.M(1)").WithArguments("C.M(int)").WithLocation(2, 1),
2872
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c.M2()").WithArguments("C.M2()").WithLocation(3, 1),
2930
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "123.M1()").WithArguments("E.M1(int)").WithLocation(1, 1),
2933
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "123.M2()").WithArguments("E.extension(int).M2()").WithLocation(2, 1),
2936
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "E.M1(123)").WithArguments("E.M1(int)").WithLocation(3, 1),
2939
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "E.M2(123)").WithArguments("E.M2(int)").WithLocation(4, 1),
2974
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c.M3()").WithArguments("C.M3()").WithLocation(4, 1),
3000
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "&C.M").WithArguments("C.M()").WithLocation(1, 22),
3039
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "C.M").WithArguments("C.M()").WithLocation(1, 8),
3042
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "C.M").WithArguments("C.M()").WithLocation(2, 8),
3084
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "F = 0").WithArguments("A.F(int)").WithLocation(3, 4),
3116
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "i.M2()").WithArguments("I.M2()").WithLocation(3, 1),
3147
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "new C().M1()").WithArguments("C.M1()").WithLocation(1, 1),
3251
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "d2.M1()").WithArguments("D2.M1()").WithLocation(2, 20),
3254
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "d2.M2()").WithArguments("D2.M2()").WithLocation(2, 29),
3257
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "d2.M3()").WithArguments("D2.M3()").WithLocation(2, 38),
3260
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "d2.M4()").WithArguments("D2.M4()").WithLocation(2, 47),
3263
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "d2.M5()").WithArguments("D2.M5()").WithLocation(2, 56),
3266
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "d2.M6()").WithArguments("D2.M6()").WithLocation(2, 65),
3269
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "d3.M1()").WithArguments("C.M1()").WithLocation(3, 20),
3272
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "d3.M5()").WithArguments("C.M5()").WithLocation(3, 56),
3275
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c.M1()").WithArguments("C.M1()").WithLocation(4, 11),
3278
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c.M5()").WithArguments("C.M5()").WithLocation(4, 43),
3281
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "base.M1()").WithArguments("C.M1()").WithLocation(14, 31),
3296
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "d2.M1()").WithArguments("D2.M1()").WithLocation(2, 20),
3299
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "d2.M2()").WithArguments("D2.M2()").WithLocation(2, 29),
3302
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "d2.M3()").WithArguments("D2.M3()").WithLocation(2, 38),
3305
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "d2.M4()").WithArguments("D2.M4()").WithLocation(2, 47),
3308
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "d2.M5()").WithArguments("D2.M5()").WithLocation(2, 56),
3311
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "d2.M6()").WithArguments("D2.M6()").WithLocation(2, 65),
3412
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c2.M()").WithArguments("C2.M()").WithLocation(4, 1),
3415
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "b.M()").WithArguments("B.M()").WithLocation(6, 1),
3512
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "i1.M1()").WithArguments("I1.M1()").WithLocation(3, 1),
3515
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "i2.M2()").WithArguments("I2.M2()").WithLocation(7, 1),
3610
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c.M2(null)").WithArguments("B<D>.M2(D)").WithLocation(3, 1),
3672
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c1.M1()").WithArguments("C1.M1()").WithLocation(2, 1),
3675
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "b1.M2()").WithArguments("B1.M2()").WithLocation(6, 1),
3678
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "i.M2()").WithArguments("I.M2()").WithLocation(9, 1),
3696
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c1.M1()").WithArguments("C1.M1()").WithLocation(2, 1),
3735
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c.M2()").WithArguments("C1.M2()").WithLocation(3, 1),
3817
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "await new C()").WithArguments("C.GetAwaiter()").WithLocation(1, 1),
3820
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "await new C()").WithArguments("C.IsCompleted.get").WithLocation(1, 1),
3823
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "await new C()").WithArguments("C.GetResult()").WithLocation(1, 1),
3907
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "new Task()").WithArguments("System.Runtime.CompilerServices.AsyncHelpers.AwaitAwaiter<System.Threading.Tasks.Task>(System.Threading.Tasks.Task)").WithLocation(7, 15));
3971
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "[1, 2, 3]").WithArguments("C.Create(System.ReadOnlySpan<int>)").WithLocation(1, 8),
3974
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "M(1, 2, 3)").WithArguments("C.Create(System.ReadOnlySpan<int>)").WithLocation(2, 1),
3977
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "params C c").WithArguments("C.Create(System.ReadOnlySpan<int>)").WithLocation(3, 15),
3980
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "M3(1, 2, 3)").WithArguments("C.Create(System.ReadOnlySpan<int>)").WithLocation(12, 1),
4055
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "[1, 2, 3]").WithArguments("C.C()").WithLocation(1, 8),
4058
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "M1(1, 2, 3)").WithArguments("C.C()").WithLocation(2, 1),
4061
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "params C c").WithArguments("C.C()").WithLocation(3, 16),
4064
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "M3(1, 2, 3)").WithArguments("C.C()").WithLocation(12, 1),
4114
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "1").WithArguments("C.Add(int)").WithLocation(1, 9),
4117
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "2").WithArguments("C.Add(int)").WithLocation(1, 12),
4120
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "3").WithArguments("C.Add(int)").WithLocation(1, 15),
4123
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "1").WithArguments("C.Add(int)").WithLocation(2, 16),
4126
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "2").WithArguments("C.Add(int)").WithLocation(2, 19),
4129
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "3").WithArguments("C.Add(int)").WithLocation(2, 22),
4132
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "new C()").WithArguments("C.Add(int)").WithLocation(3, 12),
4135
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "1").WithArguments("C.Add(int)").WithLocation(4, 22),
4138
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "2").WithArguments("C.Add(int)").WithLocation(4, 25),
4141
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "3").WithArguments("C.Add(int)").WithLocation(4, 28),
4144
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "1").WithArguments("C.Add(int)").WithLocation(5, 4),
4147
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "2").WithArguments("C.Add(int)").WithLocation(5, 7),
4150
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "3").WithArguments("C.Add(int)").WithLocation(5, 10),
4153
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "params C c").WithArguments("C.Add(int)").WithLocation(6, 16),
4156
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "1").WithArguments("C.Add(int)").WithLocation(18, 4),
4159
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "2").WithArguments("C.Add(int)").WithLocation(18, 7),
4162
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "3").WithArguments("C.Add(int)").WithLocation(18, 10),
4193
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "foreach").WithArguments("C.GetEnumerator()").WithLocation(1, 1),
4229
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "..").WithArguments("C.GetEnumerator()").WithLocation(1, 9),
4232
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "..").WithArguments("C.MoveNext()").WithLocation(1, 9),
4235
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "..").WithArguments("C.Current.get").WithLocation(1, 9),
4263
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "foreach").WithArguments("C.MoveNext()").WithLocation(1, 1),
4293
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "foreach").WithArguments("C.Current.get").WithLocation(1, 1),
4320
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "foreach").WithArguments("C.Current.get").WithLocation(1, 1),
4442
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "foreach").WithArguments("System.IDisposable.Dispose()").WithLocation(1, 1),
4445
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "var c = new C()").WithArguments("System.IDisposable.Dispose()").WithLocation(2, 8),
4448
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "..").WithArguments("System.IDisposable.Dispose()").WithLocation(3, 43),
4480
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "foreach (var x in new S()) { }").WithArguments("S.Dispose()").WithLocation(1, 1),
4483
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "var s = new S()").WithArguments("S.Dispose()").WithLocation(2, 8),
4513
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "await foreach (var x in new C()) { }").WithArguments("C.DisposeAsync()").WithLocation(1, 1),
4516
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "var c = new C()").WithArguments("C.DisposeAsync()").WithLocation(2, 14),
4540
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "new C2()").WithArguments("C2.GetPinnableReference()").WithLocation(2, 17),
4581
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "new C()").WithArguments("C.Deconstruct(out int, out int)").WithLocation(1, 14),
4614
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "new System.Threading.Lock()").WithArguments("System.Threading.Lock.EnterScope()").WithLocation(1, 7),
4617
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "new System.Threading.Lock()").WithArguments("System.Threading.Lock.Scope.Dispose()").WithLocation(1, 7),
4647
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "(int x, string y)").WithArguments("System.Runtime.CompilerServices.ITuple.Length.get").WithLocation(2, 10),
4650
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "(int x, string y)").WithArguments("System.Runtime.CompilerServices.ITuple.this[int].get").WithLocation(2, 10),
4682
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "a").WithArguments("C.AppendLiteral(string)").WithLocation(1, 7),
4685
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "{0}").WithArguments("C.AppendFormatted<int>(int)").WithLocation(1, 8),
4688
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, @"$""a{0}""").WithArguments("C.C(int, int)").WithLocation(1, 5),
4728
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "C.M()").WithArguments("C.M()").WithLocation(1, 1),
4762
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "C.M()").WithArguments("C.M()").WithLocation(1, 19),
4793
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "M1()").WithArguments("M1()").WithLocation(1, 1));
4871
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c.P2").WithArguments("C.P2.set").WithLocation(3, 1),
4874
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c.P2").WithArguments("C.P2.get").WithLocation(3, 8)
4901
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c.P").WithArguments("C.P.set").WithLocation(2, 1),
4904
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c.P").WithArguments("C.P.get").WithLocation(2, 1),
4947
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "P1").WithArguments("C.P1.set").WithLocation(3, 5),
4950
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "P3").WithArguments("C.P3.set").WithLocation(5, 5),
4953
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "P1").WithArguments("C.P1.get").WithLocation(10, 5),
4956
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "P2").WithArguments("C.P2.get").WithLocation(11, 5),
4987
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "Length:").WithArguments("C.Length.get").WithLocation(2, 12),
4990
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "[]").WithArguments("C.Length.get").WithLocation(3, 10),
4993
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "[]").WithArguments("C.Length.get").WithLocation(3, 10),
4996
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "[]").WithArguments("C.this[int].get").WithLocation(3, 10),
5032
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "x.P2").WithArguments("E.extension(int).P2.set").WithLocation(3, 1),
5035
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "x.P2").WithArguments("E.extension(int).P2.get").WithLocation(3, 8),
5038
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "E.get_P2(x)").WithArguments("E.get_P2(int)").WithLocation(5, 1),
5041
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "E.set_P2(x, 0)").WithArguments("E.set_P2(int, int)").WithLocation(5, 14),
5069
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c.P2").WithArguments("C.P2.set").WithLocation(2, 1),
5072
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c.P2").WithArguments("C.P2.get").WithLocation(2, 15),
5103
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c.P1").WithArguments("C.P1.get").WithLocation(2, 8),
5106
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c.P2").WithArguments("C.P2.set").WithLocation(3, 1),
5159
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "P2 = 0").WithArguments("A.P2.set").WithLocation(2, 12),
5162
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "P4 = 0").WithArguments("A.P4.set").WithLocation(2, 28),
5165
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "P2 = 0").WithArguments("A.P2.set").WithLocation(6, 16),
5168
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "P4 = 0").WithArguments("A.P4.set").WithLocation(6, 32),
5215
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c.P2").WithArguments("C1.P2.set").WithLocation(3, 1),
5218
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c.P2").WithArguments("C1.P2.get").WithLocation(3, 8),
5221
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c.P3").WithArguments("C1.P3.get").WithLocation(4, 8),
5239
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c.P2").WithArguments("C1.P2.set").WithLocation(3, 1),
5242
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c.P2").WithArguments("C1.P2.get").WithLocation(3, 8),
5245
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c.P3").WithArguments("C1.P3.get").WithLocation(4, 8),
5316
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "i.P1").WithArguments("I.P1.set").WithLocation(2, 1),
5319
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "i.P1").WithArguments("I.P1.get").WithLocation(2, 8),
5322
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "i.P2").WithArguments("I.P2.get").WithLocation(3, 8),
5394
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c2[0]").WithArguments("C2.this[int].set").WithLocation(4, 1),
5397
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c2[0]").WithArguments("C2.this[int].get").WithLocation(4, 9),
5424
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c[0]").WithArguments("C.this[int].set").WithLocation(2, 1),
5427
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c[0]").WithArguments("C.this[int].get").WithLocation(2, 1),
5457
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "[0]").WithArguments("C1.this[int].set").WithLocation(1, 14),
5460
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "[0]").WithArguments("C1.this[int].get").WithLocation(1, 26),
5463
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "[0]").WithArguments("C2.this[int].get").WithLocation(2, 26),
5466
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "[0]").WithArguments("C3.this[int].set").WithLocation(3, 14),
5501
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c1[0]").WithArguments("C1.this[int].get").WithLocation(2, 9),
5504
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c2[0]").WithArguments("C2.this[int].set").WithLocation(4, 1),
5546
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "+=").WithArguments("C.E2.add").WithLocation(3, 6),
5578
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "E3").WithArguments("C.E3").WithLocation(9, 9),
5581
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "E4").WithArguments("C.E4").WithLocation(10, 9),
5584
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "E3").WithArguments("C.E3").WithLocation(14, 9),
5587
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "E4").WithArguments("C.E4").WithLocation(15, 9));
5613
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "+=").WithArguments("C.E1.add").WithLocation(2, 6),
5616
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "-=").WithArguments("C.E2.remove").WithLocation(3, 20),
5672
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "+=").WithArguments("C1.E3.add").WithLocation(4, 6),
5675
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "+=").WithArguments("C1.E4.add").WithLocation(5, 6),
5687
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "+=").WithArguments("C1.E3.add").WithLocation(4, 6),
5690
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "+=").WithArguments("C1.E4.add").WithLocation(5, 6),
5760
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "+=").WithArguments("I.E1.add").WithLocation(2, 6),
5817
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "new C()").WithArguments("C.C()").WithLocation(2, 5),
5820
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "new C3()").WithArguments("C3.C3()").WithLocation(5, 5),
5876
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "new C5()").WithArguments("C5.C5()").WithLocation(5, 5),
5879
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "class C1 : B;").WithArguments("B.B()").WithLocation(10, 1),
5882
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "public C2() { }").WithArguments("B.B()").WithLocation(13, 5),
5885
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, ": base()").WithArguments("B.B()").WithLocation(14, 22),
5888
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "B()").WithArguments("B.B()").WithLocation(16, 14),
5892
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, @"[System.Runtime.CompilerServices.RequiresUnsafe]
5896
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, ": base()").WithArguments("B.B()").WithLocation(31, 22),
5902
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "new C5()").WithArguments("C5.C5()").WithLocation(5, 5),
5926
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, ": this(0)").WithArguments("C.C(int)").WithLocation(7, 19),
5929
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, ": this(0)").WithArguments("C.C(int)").WithLocation(9, 23));
5980
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "A").WithArguments("A.A()").WithLocation(2, 2),
6044
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c - c").WithArguments("C.operator -(C, C)").WithLocation(3, 5),
6080
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c - c").WithArguments("E.extension(C).operator -(C, C)").WithLocation(3, 5),
6083
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "E.op_Subtraction(c, c)").WithArguments("E.op_Subtraction(C, C)").WithLocation(5, 1),
6112
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c -= c").WithArguments("C.operator -=(C)").WithLocation(3, 1),
6148
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c -= c").WithArguments("E.extension(C).operator -=(C)").WithLocation(3, 1),
6151
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "E.op_SubtractionAssignment(c, c)").WithArguments("E.op_SubtractionAssignment(C, C)").WithLocation(5, 1),
6180
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c--").WithArguments("C.operator --()").WithLocation(3, 1),
6209
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c").WithArguments("C.implicit operator string(C)").WithLocation(3, 12),
7291
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c.M2()").WithArguments("C.M2()").WithLocation(3, 1),
7294
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "C.M3()").WithArguments("C.M3()").WithLocation(4, 1),
7297
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c.M4()").WithArguments("C.M4()").WithLocation(5, 1),
7377
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c.M()").WithArguments("C.M()").WithLocation(2, 1))
7442
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c.M()").WithArguments("C.M()").WithLocation(2, 1),
7523
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "d3.M1()").WithArguments("D3.M1()").WithLocation(4, 20),
7526
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "d3.M2()").WithArguments("D3.M2()").WithLocation(4, 29),
7529
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "d3.M3()").WithArguments("D3.M3()").WithLocation(4, 38),
7532
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "d3.M4()").WithArguments("D3.M4()").WithLocation(4, 47),
7535
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "d3.M5()").WithArguments("D3.M5()").WithLocation(4, 56),
7538
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "d3.M6()").WithArguments("D3.M6()").WithLocation(4, 65),
7541
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "d4.M1()").WithArguments("C.M1()").WithLocation(5, 20),
7544
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "d4.M2()").WithArguments("C.M2()").WithLocation(5, 29),
7547
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "d4.M3()").WithArguments("B.M3()").WithLocation(5, 38),
7550
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "d4.M4()").WithArguments("C.M4()").WithLocation(5, 47),
7553
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "d4.M5()").WithArguments("C.M5()").WithLocation(5, 56),
7556
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c.M1()").WithArguments("C.M1()").WithLocation(6, 11),
7559
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c.M2()").WithArguments("C.M2()").WithLocation(6, 19),
7562
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c.M3()").WithArguments("B.M3()").WithLocation(6, 27),
7565
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c.M4()").WithArguments("C.M4()").WithLocation(6, 35),
7568
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c.M5()").WithArguments("C.M5()").WithLocation(6, 43),
7574
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "base.M1()").WithArguments("C.M1()").WithLocation(24, 31),
7577
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "base.M2()").WithArguments("C.M2()").WithLocation(24, 42),
7580
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "base.M3()").WithArguments("B.M3()").WithLocation(24, 53),
7583
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "base.M4()").WithArguments("C.M4()").WithLocation(24, 64),
7586
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "base.M5()").WithArguments("C.M5()").WithLocation(24, 75),
7598
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "d3.M1()").WithArguments("D3.M1()").WithLocation(4, 20),
7601
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "d3.M2()").WithArguments("D3.M2()").WithLocation(4, 29),
7604
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "d3.M3()").WithArguments("D3.M3()").WithLocation(4, 38),
7607
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "d3.M4()").WithArguments("D3.M4()").WithLocation(4, 47),
7610
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "d3.M5()").WithArguments("D3.M5()").WithLocation(4, 56),
7613
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "d3.M6()").WithArguments("D3.M6()").WithLocation(4, 65),
7616
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "d4.M1()").WithArguments("C.M1()").WithLocation(5, 20),
7619
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "d4.M2()").WithArguments("C.M2()").WithLocation(5, 29),
7622
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "d4.M4()").WithArguments("C.M4()").WithLocation(5, 47),
7625
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "d4.M5()").WithArguments("C.M5()").WithLocation(5, 56),
7628
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c.M1()").WithArguments("C.M1()").WithLocation(6, 11),
7631
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c.M2()").WithArguments("C.M2()").WithLocation(6, 19),
7634
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c.M4()").WithArguments("C.M4()").WithLocation(6, 35),
7637
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c.M5()").WithArguments("C.M5()").WithLocation(6, 43),
7646
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "base.M1()").WithArguments("C.M1()").WithLocation(24, 31),
7649
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "base.M2()").WithArguments("C.M2()").WithLocation(24, 42),
7652
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "base.M4()").WithArguments("C.M4()").WithLocation(24, 64),
7655
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "base.M5()").WithArguments("C.M5()").WithLocation(24, 75),
7736
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "i.M1()").WithArguments("I.M1()").WithLocation(3, 1),
7846
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c.P2").WithArguments("C.P2.set").WithLocation(3, 1),
7849
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "C.P3").WithArguments("C.P3.set").WithLocation(4, 1),
7852
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c.P4").WithArguments("C.P4.set").WithLocation(5, 1),
7949
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c.P").WithArguments("C.P.set").WithLocation(2, 1))
8019
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c.P1").WithArguments("C.P1.set").WithLocation(2, 1),
8022
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c.P2").WithArguments("C.P2.set").WithLocation(3, 1),
8048
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c[0]").WithArguments("C.this[int].set").WithLocation(2, 1),
8051
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c[0]").WithArguments("C.this[int].get").WithLocation(2, 8),
8132
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c[0]").WithArguments("C.this[int].set").WithLocation(2, 1),
8135
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c[0]").WithArguments("C.this[int].get").WithLocation(2, 8))
8212
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "new C1()[0]").WithArguments("C1.this[int].set").WithLocation(1, 1),
8215
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "new C2()[0]").WithArguments("C2.this[int].set").WithLocation(2, 1),
8241
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "+=").WithArguments("C.E.add").WithLocation(1, 5),
8321
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "+=").WithArguments("C.E.add").WithLocation(1, 5))
8384
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "+=").WithArguments("C.E.add").WithLocation(1, 5),
8387
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "-=").WithArguments("C.E.remove").WithLocation(2, 5),
8412
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "new C()").WithArguments("C.C()").WithLocation(1, 5),
8479
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "new C(null)").WithArguments("C.C(int*)").WithLocation(1, 5))
8543
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "new C()").WithArguments("C.C()").WithLocation(1, 5),
8569
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c += c").WithArguments("C.operator +=(C)").WithLocation(2, 1),
8637
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c += null").WithArguments("C.operator +=(int*)").WithLocation(2, 1))
8702
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c += null").WithArguments("C.operator +=(C)").WithLocation(2, 1),
9042
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "new C().M()").WithArguments("C.M()").WithLocation(1, 1));
9105
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "new C().M()").WithArguments("C.M()").WithLocation(1, 1));
9199
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "A.M()").WithArguments("A.M()").WithLocation(1, 1));
9247
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "A.M()").WithArguments("A.M()").WithLocation(1, 1));