252 references to ERR_UnsafeMemberOperation
Microsoft.CodeAnalysis.CSharp (2)
Binder\Binder_Unsafe.cs (1)
114
CallerUnsafeMode.Explicit => forConstructorConstraint ? ErrorCode.ERR_UnsafeConstructorConstraint : ErrorCode.
ERR_UnsafeMemberOperation
,
Errors\ErrorFacts.cs (1)
2577
or ErrorCode.
ERR_UnsafeMemberOperation
Microsoft.CodeAnalysis.CSharp.CSharp15.UnitTests (250)
UnsafeEvolutionTests.cs (250)
3667
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c.M()").WithArguments("C.M()").WithLocation(2, 1));
3728
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "C.M(1)").WithArguments("C.M(int)").WithLocation(2, 1),
3756
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c.M2()").WithArguments("C.M2()").WithLocation(3, 1),
3814
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "123.M1()").WithArguments("E.M1(int)").WithLocation(1, 1),
3817
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "123.M2()").WithArguments("E.extension(int).M2()").WithLocation(2, 1),
3820
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "E.M1(123)").WithArguments("E.M1(int)").WithLocation(3, 1),
3823
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "E.M2(123)").WithArguments("E.M2(int)").WithLocation(4, 1),
3858
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c.M3()").WithArguments("C.M3()").WithLocation(4, 1),
3884
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "&C.M").WithArguments("C.M()").WithLocation(1, 22),
3921
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "C.M").WithArguments("C.M()").WithLocation(1, 8),
3924
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "C.M").WithArguments("C.M()").WithLocation(2, 8),
3959
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "C.M").WithArguments("C.M()").WithLocation(1, 9),
4016
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "C.M()").WithArguments("C.M()").WithLocation(4, 31),
4058
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "F = 0").WithArguments("A.F(int)").WithLocation(3, 4),
4090
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "i.M2()").WithArguments("I.M2()").WithLocation(3, 1),
4121
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "new C().M1()").WithArguments("C.M1()").WithLocation(1, 1),
4232
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "d2.M1()").WithArguments("D2.M1()").WithLocation(2, 20),
4235
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "d2.M2()").WithArguments("D2.M2()").WithLocation(2, 29),
4238
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "d2.M3()").WithArguments("D2.M3()").WithLocation(2, 38),
4241
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "d2.M4()").WithArguments("D2.M4()").WithLocation(2, 47),
4244
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "d2.M5()").WithArguments("D2.M5()").WithLocation(2, 56),
4247
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "d2.M6()").WithArguments("D2.M6()").WithLocation(2, 65),
4250
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "d3.M1()").WithArguments("C.M1()").WithLocation(3, 20),
4253
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "d3.M5()").WithArguments("C.M5()").WithLocation(3, 56),
4256
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c.M1()").WithArguments("C.M1()").WithLocation(4, 11),
4259
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c.M5()").WithArguments("C.M5()").WithLocation(4, 43),
4262
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "base.M1()").WithArguments("C.M1()").WithLocation(14, 31),
4277
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "d2.M1()").WithArguments("D2.M1()").WithLocation(2, 20),
4280
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "d2.M2()").WithArguments("D2.M2()").WithLocation(2, 29),
4283
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "d2.M3()").WithArguments("D2.M3()").WithLocation(2, 38),
4286
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "d2.M4()").WithArguments("D2.M4()").WithLocation(2, 47),
4289
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "d2.M5()").WithArguments("D2.M5()").WithLocation(2, 56),
4292
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "d2.M6()").WithArguments("D2.M6()").WithLocation(2, 65),
4393
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c2.M()").WithArguments("C2.M()").WithLocation(4, 1),
4396
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "b.M()").WithArguments("B.M()").WithLocation(6, 1),
4493
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "i1.M1()").WithArguments("I1.M1()").WithLocation(3, 1),
4496
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "i2.M2()").WithArguments("I2.M2()").WithLocation(7, 1),
4591
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c.M2(null)").WithArguments("B<D>.M2(D)").WithLocation(3, 1),
4653
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c1.M1()").WithArguments("C1.M1()").WithLocation(2, 1),
4656
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "b1.M2()").WithArguments("B1.M2()").WithLocation(6, 1),
4659
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "i.M2()").WithArguments("I.M2()").WithLocation(9, 1),
4677
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c1.M1()").WithArguments("C1.M1()").WithLocation(2, 1),
4716
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c.M2()").WithArguments("C1.M2()").WithLocation(3, 1),
4798
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "await new C()").WithArguments("C.GetAwaiter()").WithLocation(1, 1),
4801
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "await new C()").WithArguments("C.IsCompleted.get").WithLocation(1, 1),
4804
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "await new C()").WithArguments("C.GetResult()").WithLocation(1, 1),
4891
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "new Task()").WithArguments("System.Runtime.CompilerServices.AsyncHelpers.AwaitAwaiter<System.Threading.Tasks.Task>(System.Threading.Tasks.Task)").WithLocation(7, 15));
4955
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "[1, 2, 3]").WithArguments("C.Create(System.ReadOnlySpan<int>)").WithLocation(1, 8),
4958
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "M(1, 2, 3)").WithArguments("C.Create(System.ReadOnlySpan<int>)").WithLocation(2, 1),
4961
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "params C c").WithArguments("C.Create(System.ReadOnlySpan<int>)").WithLocation(3, 15),
4964
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "M3(1, 2, 3)").WithArguments("C.Create(System.ReadOnlySpan<int>)").WithLocation(12, 1),
5039
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "[1, 2, 3]").WithArguments("C.C()").WithLocation(1, 8),
5042
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "M1(1, 2, 3)").WithArguments("C.C()").WithLocation(2, 1),
5045
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "params C c").WithArguments("C.C()").WithLocation(3, 16),
5048
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "M3(1, 2, 3)").WithArguments("C.C()").WithLocation(12, 1),
5080
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "with(0)").WithArguments("C.C(int)").WithLocation(1, 9),
5130
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "1").WithArguments("C.Add(int)").WithLocation(1, 9),
5133
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "2").WithArguments("C.Add(int)").WithLocation(1, 12),
5136
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "3").WithArguments("C.Add(int)").WithLocation(1, 15),
5139
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "1").WithArguments("C.Add(int)").WithLocation(2, 16),
5142
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "2").WithArguments("C.Add(int)").WithLocation(2, 19),
5145
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "3").WithArguments("C.Add(int)").WithLocation(2, 22),
5148
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "new C()").WithArguments("C.Add(int)").WithLocation(3, 12),
5151
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "1").WithArguments("C.Add(int)").WithLocation(4, 22),
5154
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "2").WithArguments("C.Add(int)").WithLocation(4, 25),
5157
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "3").WithArguments("C.Add(int)").WithLocation(4, 28),
5160
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "1").WithArguments("C.Add(int)").WithLocation(5, 4),
5163
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "2").WithArguments("C.Add(int)").WithLocation(5, 7),
5166
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "3").WithArguments("C.Add(int)").WithLocation(5, 10),
5169
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "params C c").WithArguments("C.Add(int)").WithLocation(6, 16),
5172
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "1").WithArguments("C.Add(int)").WithLocation(18, 4),
5175
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "2").WithArguments("C.Add(int)").WithLocation(18, 7),
5178
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "3").WithArguments("C.Add(int)").WithLocation(18, 10),
5209
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "foreach").WithArguments("C.GetEnumerator()").WithLocation(1, 1),
5245
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "..").WithArguments("C.GetEnumerator()").WithLocation(1, 9),
5248
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "..").WithArguments("C.MoveNext()").WithLocation(1, 9),
5251
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "..").WithArguments("C.Current.get").WithLocation(1, 9),
5279
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "foreach").WithArguments("C.MoveNext()").WithLocation(1, 1),
5309
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "foreach").WithArguments("C.Current.get").WithLocation(1, 1),
5336
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "foreach").WithArguments("C.Current.get").WithLocation(1, 1),
5462
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "foreach").WithArguments("System.IDisposable.Dispose()").WithLocation(1, 1),
5465
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "var c = new C()").WithArguments("System.IDisposable.Dispose()").WithLocation(2, 8),
5468
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "..").WithArguments("System.IDisposable.Dispose()").WithLocation(3, 43),
5500
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "foreach (var x in new S()) { }").WithArguments("S.Dispose()").WithLocation(1, 1),
5503
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "var s = new S()").WithArguments("S.Dispose()").WithLocation(2, 8),
5533
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "await foreach (var x in new C()) { }").WithArguments("C.DisposeAsync()").WithLocation(1, 1),
5536
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "var c = new C()").WithArguments("C.DisposeAsync()").WithLocation(2, 14),
5560
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "new C2()").WithArguments("C2.GetPinnableReference()").WithLocation(2, 17),
5601
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "new C()").WithArguments("C.Deconstruct(out int, out int)").WithLocation(1, 14),
5634
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "new System.Threading.Lock()").WithArguments("System.Threading.Lock.EnterScope()").WithLocation(1, 7),
5637
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "new System.Threading.Lock()").WithArguments("System.Threading.Lock.Scope.Dispose()").WithLocation(1, 7),
5667
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "(int x, string y)").WithArguments("System.Runtime.CompilerServices.ITuple.Length.get").WithLocation(2, 10),
5670
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "(int x, string y)").WithArguments("System.Runtime.CompilerServices.ITuple.this[int].get").WithLocation(2, 10),
5702
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "a").WithArguments("C.AppendLiteral(string)").WithLocation(1, 7),
5705
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "{0}").WithArguments("C.AppendFormatted<int>(int)").WithLocation(1, 8),
5708
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, @"$""a{0}""").WithArguments("C.C(int, int)").WithLocation(1, 5),
5748
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "C.M()").WithArguments("C.M()").WithLocation(1, 1),
5782
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "C.M()").WithArguments("C.M()").WithLocation(1, 19),
5813
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "M1()").WithArguments("M1()").WithLocation(1, 1));
5892
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c.P2").WithArguments("C.P2.set").WithLocation(3, 1),
5895
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c.P2").WithArguments("C.P2.get").WithLocation(3, 8)
5922
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c.P").WithArguments("C.P.set").WithLocation(2, 1),
5925
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c.P").WithArguments("C.P.get").WithLocation(2, 1),
5968
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "P1").WithArguments("C.P1.set").WithLocation(3, 5),
5971
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "P3").WithArguments("C.P3.set").WithLocation(5, 5),
5974
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "P1").WithArguments("C.P1.get").WithLocation(10, 5),
5977
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "P2").WithArguments("C.P2.get").WithLocation(11, 5),
6008
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "Length:").WithArguments("C.Length.get").WithLocation(2, 12),
6011
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "[]").WithArguments("C.Length.get").WithLocation(3, 10),
6014
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "[]").WithArguments("C.Length.get").WithLocation(3, 10),
6017
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "[]").WithArguments("C.this[int].get").WithLocation(3, 10),
6053
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "x.P2").WithArguments("E.extension(int).P2.set").WithLocation(3, 1),
6056
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "x.P2").WithArguments("E.extension(int).P2.get").WithLocation(3, 8),
6059
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "E.get_P2(x)").WithArguments("E.get_P2(int)").WithLocation(5, 1),
6062
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "E.set_P2(x, 0)").WithArguments("E.set_P2(int, int)").WithLocation(5, 14),
6090
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c.P2").WithArguments("C.P2.set").WithLocation(2, 1),
6093
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c.P2").WithArguments("C.P2.get").WithLocation(2, 15),
6124
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c.P1").WithArguments("C.P1.get").WithLocation(2, 8),
6127
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c.P2").WithArguments("C.P2.set").WithLocation(3, 1),
6361
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "P2 = 0").WithArguments("A.P2.set").WithLocation(2, 12),
6364
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "P4 = 0").WithArguments("A.P4.set").WithLocation(2, 28),
6367
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "P2 = 0").WithArguments("A.P2.set").WithLocation(6, 16),
6370
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "P4 = 0").WithArguments("A.P4.set").WithLocation(6, 32),
6417
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c.P2").WithArguments("C1.P2.set").WithLocation(3, 1),
6420
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c.P2").WithArguments("C1.P2.get").WithLocation(3, 8),
6423
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c.P3").WithArguments("C1.P3.get").WithLocation(4, 8),
6441
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c.P2").WithArguments("C1.P2.set").WithLocation(3, 1),
6444
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c.P2").WithArguments("C1.P2.get").WithLocation(3, 8),
6447
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c.P3").WithArguments("C1.P3.get").WithLocation(4, 8),
6518
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "i.P1").WithArguments("I.P1.set").WithLocation(2, 1),
6521
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "i.P1").WithArguments("I.P1.get").WithLocation(2, 8),
6524
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "i.P2").WithArguments("I.P2.get").WithLocation(3, 8),
6596
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c2[0]").WithArguments("C2.this[int].set").WithLocation(4, 1),
6599
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c2[0]").WithArguments("C2.this[int].get").WithLocation(4, 9),
6626
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c[0]").WithArguments("C.this[int].set").WithLocation(2, 1),
6629
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c[0]").WithArguments("C.this[int].get").WithLocation(2, 1),
6659
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "[0]").WithArguments("C1.this[int].set").WithLocation(1, 14),
6662
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "[0]").WithArguments("C1.this[int].get").WithLocation(1, 26),
6665
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "[0]").WithArguments("C2.this[int].get").WithLocation(2, 26),
6668
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "[0]").WithArguments("C3.this[int].set").WithLocation(3, 14),
6703
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c1[0]").WithArguments("C1.this[int].get").WithLocation(2, 9),
6706
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c2[0]").WithArguments("C2.this[int].set").WithLocation(4, 1),
6905
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "+=").WithArguments("C.E2.add").WithLocation(3, 6),
6937
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "E3").WithArguments("C.E3").WithLocation(9, 9),
6940
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "E4").WithArguments("C.E4").WithLocation(10, 9),
6943
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "E3").WithArguments("C.E3").WithLocation(14, 9),
6946
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "E4").WithArguments("C.E4").WithLocation(15, 9));
6972
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "+=").WithArguments("C.E1.add").WithLocation(2, 6),
6975
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "-=").WithArguments("C.E2.remove").WithLocation(3, 20),
7051
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "+=").WithArguments("C1.E3.add").WithLocation(4, 6),
7054
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "+=").WithArguments("C1.E4.add").WithLocation(5, 6),
7066
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "+=").WithArguments("C1.E3.add").WithLocation(4, 6),
7069
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "+=").WithArguments("C1.E4.add").WithLocation(5, 6),
7139
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "+=").WithArguments("I.E1.add").WithLocation(2, 6),
7196
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "new C()").WithArguments("C.C()").WithLocation(2, 5),
7199
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "new C3()").WithArguments("C3.C3()").WithLocation(5, 5),
7255
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "new C5()").WithArguments("C5.C5()").WithLocation(5, 5),
7258
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "class C1 : B;").WithArguments("B.B()").WithLocation(10, 1),
7261
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "public C2() { }").WithArguments("B.B()").WithLocation(13, 5),
7264
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, ": base()").WithArguments("B.B()").WithLocation(14, 22),
7267
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "B()").WithArguments("B.B()").WithLocation(16, 14),
7271
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, @"[System.Diagnostics.CodeAnalysis.RequiresUnsafe]
7275
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, ": base()").WithArguments("B.B()").WithLocation(31, 22),
7281
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "new C5()").WithArguments("C5.C5()").WithLocation(5, 5),
7305
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, ": this(0)").WithArguments("C.C(int)").WithLocation(7, 19),
7308
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, ": this(0)").WithArguments("C.C(int)").WithLocation(9, 23));
7359
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "A").WithArguments("A.A()").WithLocation(2, 2),
7437
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "new C()").WithArguments("C.C()").WithLocation(1, 9),
7771
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c - c").WithArguments("C.operator -(C, C)").WithLocation(3, 5),
7807
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c - c").WithArguments("E.extension(C).operator -(C, C)").WithLocation(3, 5),
7810
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "E.op_Subtraction(c, c)").WithArguments("E.op_Subtraction(C, C)").WithLocation(5, 1),
7839
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c -= c").WithArguments("C.operator -=(C)").WithLocation(3, 1),
7875
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c -= c").WithArguments("E.extension(C).operator -=(C)").WithLocation(3, 1),
7878
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "E.op_SubtractionAssignment(c, c)").WithArguments("E.op_SubtractionAssignment(C, C)").WithLocation(5, 1),
7907
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c--").WithArguments("C.operator --()").WithLocation(3, 1),
7936
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c").WithArguments("C.implicit operator string(C)").WithLocation(3, 12),
8056
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "C.M()").WithArguments("C.M()").WithLocation(5, 14),
9230
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c.M2()").WithArguments("C.M2()").WithLocation(3, 1),
9233
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "C.M3()").WithArguments("C.M3()").WithLocation(4, 1),
9236
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c.M4()").WithArguments("C.M4()").WithLocation(5, 1),
9327
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c.M()").WithArguments("C.M()").WithLocation(2, 1))
9400
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c.M()").WithArguments("C.M()").WithLocation(2, 1),
9481
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "d3.M1()").WithArguments("D3.M1()").WithLocation(4, 20),
9484
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "d3.M2()").WithArguments("D3.M2()").WithLocation(4, 29),
9487
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "d3.M3()").WithArguments("D3.M3()").WithLocation(4, 38),
9490
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "d3.M4()").WithArguments("D3.M4()").WithLocation(4, 47),
9493
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "d3.M5()").WithArguments("D3.M5()").WithLocation(4, 56),
9496
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "d3.M6()").WithArguments("D3.M6()").WithLocation(4, 65),
9499
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "d4.M1()").WithArguments("C.M1()").WithLocation(5, 20),
9502
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "d4.M2()").WithArguments("C.M2()").WithLocation(5, 29),
9505
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "d4.M3()").WithArguments("B.M3()").WithLocation(5, 38),
9508
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "d4.M4()").WithArguments("C.M4()").WithLocation(5, 47),
9511
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "d4.M5()").WithArguments("C.M5()").WithLocation(5, 56),
9514
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c.M1()").WithArguments("C.M1()").WithLocation(6, 11),
9517
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c.M2()").WithArguments("C.M2()").WithLocation(6, 19),
9520
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c.M3()").WithArguments("B.M3()").WithLocation(6, 27),
9523
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c.M4()").WithArguments("C.M4()").WithLocation(6, 35),
9526
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c.M5()").WithArguments("C.M5()").WithLocation(6, 43),
9532
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "base.M1()").WithArguments("C.M1()").WithLocation(24, 31),
9535
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "base.M2()").WithArguments("C.M2()").WithLocation(24, 42),
9538
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "base.M3()").WithArguments("B.M3()").WithLocation(24, 53),
9541
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "base.M4()").WithArguments("C.M4()").WithLocation(24, 64),
9544
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "base.M5()").WithArguments("C.M5()").WithLocation(24, 75),
9556
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "d3.M1()").WithArguments("D3.M1()").WithLocation(4, 20),
9559
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "d3.M2()").WithArguments("D3.M2()").WithLocation(4, 29),
9562
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "d3.M3()").WithArguments("D3.M3()").WithLocation(4, 38),
9565
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "d3.M4()").WithArguments("D3.M4()").WithLocation(4, 47),
9568
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "d3.M5()").WithArguments("D3.M5()").WithLocation(4, 56),
9571
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "d3.M6()").WithArguments("D3.M6()").WithLocation(4, 65),
9574
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "d4.M1()").WithArguments("C.M1()").WithLocation(5, 20),
9577
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "d4.M2()").WithArguments("C.M2()").WithLocation(5, 29),
9580
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "d4.M4()").WithArguments("C.M4()").WithLocation(5, 47),
9583
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "d4.M5()").WithArguments("C.M5()").WithLocation(5, 56),
9586
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c.M1()").WithArguments("C.M1()").WithLocation(6, 11),
9589
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c.M2()").WithArguments("C.M2()").WithLocation(6, 19),
9592
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c.M4()").WithArguments("C.M4()").WithLocation(6, 35),
9595
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c.M5()").WithArguments("C.M5()").WithLocation(6, 43),
9604
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "base.M1()").WithArguments("C.M1()").WithLocation(24, 31),
9607
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "base.M2()").WithArguments("C.M2()").WithLocation(24, 42),
9610
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "base.M4()").WithArguments("C.M4()").WithLocation(24, 64),
9613
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "base.M5()").WithArguments("C.M5()").WithLocation(24, 75),
9694
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "i.M1()").WithArguments("I.M1()").WithLocation(3, 1),
9815
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c.P2").WithArguments("C.P2.set").WithLocation(3, 1),
9818
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "C.P3").WithArguments("C.P3.set").WithLocation(4, 1),
9821
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c.P4").WithArguments("C.P4.set").WithLocation(5, 1),
9929
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c.P").WithArguments("C.P.set").WithLocation(2, 1))
10007
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c.P1").WithArguments("C.P1.set").WithLocation(2, 1),
10010
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c.P2").WithArguments("C.P2.set").WithLocation(3, 1),
10036
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c[0]").WithArguments("C.this[int].set").WithLocation(2, 1),
10039
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c[0]").WithArguments("C.this[int].get").WithLocation(2, 8),
10132
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c[0]").WithArguments("C.this[int].set").WithLocation(2, 1),
10135
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c[0]").WithArguments("C.this[int].get").WithLocation(2, 8))
10220
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "new C1()[0]").WithArguments("C1.this[int].set").WithLocation(1, 1),
10223
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "new C2()[0]").WithArguments("C2.this[int].set").WithLocation(2, 1),
10249
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "+=").WithArguments("C.E.add").WithLocation(1, 5),
10341
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "+=").WithArguments("C.E.add").WithLocation(1, 5))
10404
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "+=").WithArguments("C.E.add").WithLocation(1, 5),
10407
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "-=").WithArguments("C.E.remove").WithLocation(2, 5),
10432
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "new C()").WithArguments("C.C()").WithLocation(1, 5),
10511
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "new C(null)").WithArguments("C.C(int*)").WithLocation(1, 5))
10583
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "new C()").WithArguments("C.C()").WithLocation(1, 5),
10609
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c += c").WithArguments("C.operator +=(C)").WithLocation(2, 1),
10689
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c += null").WithArguments("C.operator +=(int*)").WithLocation(2, 1))
10762
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c += null").WithArguments("C.operator +=(C)").WithLocation(2, 1),
11102
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "new C().M()").WithArguments("C.M()").WithLocation(1, 1));
11165
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "new C().M()").WithArguments("C.M()").WithLocation(1, 1));
11259
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "A.M()").WithArguments("A.M()").WithLocation(1, 1));
11307
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "A.M()").WithArguments("A.M()").WithLocation(1, 1));
11481
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c.M1()").WithArguments("C.M1()").WithLocation(2, 1),
11484
Diagnostic(ErrorCode.
ERR_UnsafeMemberOperation
, "c.M2()").WithArguments("C.M2()").WithLocation(3, 1),