522 references to ERR_EscapeCall
Microsoft.CodeAnalysis.CSharp (2)
Binder\Binder.ValueChecks.cs (1)
3377
return checkingReceiver ? ErrorCode.ERR_EscapeCall2 : ErrorCode.
ERR_EscapeCall
;
Errors\ErrorFacts.cs (1)
1869
or ErrorCode.
ERR_EscapeCall
Microsoft.CodeAnalysis.CSharp.CSharp15.UnitTests (16)
UnionsTests.cs (16)
11887
Diagnostic(ErrorCode.
ERR_EscapeCall
, "(S)100").WithArguments("S.S(in int)", "x").WithLocation(6, 13),
11893
Diagnostic(ErrorCode.
ERR_EscapeCall
, "(S)200").WithArguments("S.S(in int)", "x").WithLocation(12, 16),
11899
Diagnostic(ErrorCode.
ERR_EscapeCall
, "(S)x").WithArguments("S.S(in int)", "x").WithLocation(18, 13),
11905
Diagnostic(ErrorCode.
ERR_EscapeCall
, "(S)x").WithArguments("S.S(in int)", "x").WithLocation(29, 16),
11991
Diagnostic(ErrorCode.
ERR_EscapeCall
, "100").WithArguments("S.S(in int)", "x").WithLocation(6, 13),
11997
Diagnostic(ErrorCode.
ERR_EscapeCall
, "200").WithArguments("S.S(in int)", "x").WithLocation(12, 16),
12003
Diagnostic(ErrorCode.
ERR_EscapeCall
, "x").WithArguments("S.S(in int)", "x").WithLocation(18, 13),
12009
Diagnostic(ErrorCode.
ERR_EscapeCall
, "x").WithArguments("S.S(in int)", "x").WithLocation(29, 16),
12047
Diagnostic(ErrorCode.
ERR_EscapeCall
, "(S2)s1").WithArguments("S2.S2(S1)", "s1").WithLocation(7, 16),
12120
Diagnostic(ErrorCode.
ERR_EscapeCall
, "100").WithArguments("S.S(in int?)", "x").WithLocation(6, 13),
12126
Diagnostic(ErrorCode.
ERR_EscapeCall
, "200").WithArguments("S.S(in int?)", "x").WithLocation(12, 16),
12132
Diagnostic(ErrorCode.
ERR_EscapeCall
, "x").WithArguments("S.S(in int?)", "x").WithLocation(18, 13),
12138
Diagnostic(ErrorCode.
ERR_EscapeCall
, "x").WithArguments("S.S(in int?)", "x").WithLocation(24, 16),
12144
Diagnostic(ErrorCode.
ERR_EscapeCall
, "x").WithArguments("S.S(in int?)", "x").WithLocation(29, 16),
12180
Diagnostic(ErrorCode.
ERR_EscapeCall
, "M2(x)").WithArguments("C.M2(S)", "s").WithLocation(5, 16),
12186
Diagnostic(ErrorCode.
ERR_EscapeCall
, "x").WithArguments("S.S(in int)", "x").WithLocation(5, 19));
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (8)
CodeGen\CodeGenRefReadonlyReturnTests.cs (7)
980
Diagnostic(ErrorCode.
ERR_EscapeCall
, "M(ref local)").WithArguments("Program.M(ref int)", "x").WithLocation(11, 24),
996
Diagnostic(ErrorCode.
ERR_EscapeCall
, "M(ref local)").WithArguments("Program.M(ref int)", "x").WithLocation(11, 24));
1024
Diagnostic(ErrorCode.
ERR_EscapeCall
, "this[local]").WithArguments("Program.this[in int]", "x").WithLocation(8, 20)
1051
Diagnostic(ErrorCode.
ERR_EscapeCall
, "this[42]").WithArguments("Program.this[in int]", "x").WithLocation(6, 20)
1131
Diagnostic(ErrorCode.
ERR_EscapeCall
, "M(42)").WithArguments("Program.M(in int)", "x").WithLocation(6, 20)
1158
Diagnostic(ErrorCode.
ERR_EscapeCall
, "M()").WithArguments("Program.M(in int)", "x").WithLocation(6, 20)
1186
Diagnostic(ErrorCode.
ERR_EscapeCall
, "M(b)").WithArguments("Program.M(in int)", "x").WithLocation(7, 20)
CodeGen\CodeGenRefReturnTests.cs (1)
3158
Diagnostic(ErrorCode.
ERR_EscapeCall
, "G(ref d.Length)").WithArguments("C.G(ref dynamic)", "d").WithLocation(14, 20)
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (119)
RefStructInterfacesTests.cs (15)
2612
Diagnostic(ErrorCode.
ERR_EscapeCall
, "TRefStruct.New(ref value)").WithArguments("IRefStruct<TRefStruct>.New(ref int)", "i").WithLocation(7, 14),
2618
Diagnostic(ErrorCode.
ERR_EscapeCall
, "TRefStruct.New(ref value)").WithArguments("IRefStruct<TRefStruct>.New(ref int)", "i").WithLocation(12, 26),
2624
Diagnostic(ErrorCode.
ERR_EscapeCall
, "TRefStruct.New(ref value)").WithArguments("IRefStruct<TRefStruct>.New(ref int)", "i").WithLocation(17, 26),
2630
Diagnostic(ErrorCode.
ERR_EscapeCall
, "TRefStruct.New(ref value)").WithArguments("IRefStruct<TRefStruct>.New(ref int)", "i").WithLocation(22, 26),
26687
Diagnostic(ErrorCode.
ERR_EscapeCall
, "Test1(sp)").WithArguments("Program<T>.Test1(T)", "arg").WithLocation(24, 24)
26754
Diagnostic(ErrorCode.
ERR_EscapeCall
, "MayWrap(ref arg1)").WithArguments("Program<T>.MayWrap(ref System.Span<int>)", "arg").WithLocation(28, 20)
26947
Diagnostic(ErrorCode.
ERR_EscapeCall
, "M1(ref s1, ref s2)").WithArguments("Repro<RefStruct>.M1(ref RefStruct, ref RefStruct)", "s2").WithLocation(14, 20),
26983
Diagnostic(ErrorCode.
ERR_EscapeCall
, "c[r1]").WithArguments("C<Rint, Robject>.this[Rint]", "r").WithLocation(11, 16),
27237
Diagnostic(ErrorCode.
ERR_EscapeCall
, "MayWrap(ref inner)").WithArguments("Program<S1>.MayWrap(ref System.Span<int>)", "arg").WithLocation(21, 21)
27311
Diagnostic(ErrorCode.
ERR_EscapeCall
, "MayWrap(ref inner)").WithArguments("Program<S1>.MayWrap(ref System.Span<int>)", "arg").WithLocation(20, 20),
27317
Diagnostic(ErrorCode.
ERR_EscapeCall
, "MayWrap(ref inner)").WithArguments("Program<S1>.MayWrap(ref System.Span<int>)", "arg").WithLocation(25, 20),
27323
Diagnostic(ErrorCode.
ERR_EscapeCall
, "MayWrap(ref inner)").WithArguments("Program<S1>.MayWrap(ref System.Span<int>)", "arg").WithLocation(28, 38)
28649
Diagnostic(ErrorCode.
ERR_EscapeCall
, "X(c1 ??= c2)").WithArguments("C.X<T>(T)", "c").WithLocation(5, 16),
28655
Diagnostic(ErrorCode.
ERR_EscapeCall
, "X(c2 ??= c2)").WithArguments("C.X<T>(T)", "c").WithLocation(13, 16),
28661
Diagnostic(ErrorCode.
ERR_EscapeCall
, "X(c2 ??= c1)").WithArguments("C.X<T>(T)", "c").WithLocation(17, 16));
Semantics\CollectionExpressionTests.cs (4)
6936
Diagnostic(ErrorCode.
ERR_EscapeCall
, "F2<int>([])").WithArguments($"Program.F2<int>(in System.{spanType}<int>)", "s").WithLocation(6, 20),
21518
Diagnostic(ErrorCode.
ERR_EscapeCall
, "new(items)").WithArguments("MyCollection<T>.MyCollection(System.ReadOnlySpan<T>)", "items").WithLocation(16, 78),
26775
Diagnostic(ErrorCode.
ERR_EscapeCall
, "new ReadOnlySpan<int>(ref x1)").WithArguments("System.ReadOnlySpan<int>.ReadOnlySpan(ref readonly int)", "reference").WithLocation(5, 48),
26804
Diagnostic(ErrorCode.
ERR_EscapeCall
, "new ReadOnlySpan<int>(ref x1)").WithArguments("System.ReadOnlySpan<int>.ReadOnlySpan(ref readonly int)", "reference").WithLocation(5, 84),
Semantics\ExtensionOperatorsTests.cs (63)
3084
Diagnostic(ErrorCode.
ERR_EscapeCall
, "+s").WithArguments("Extensions.extension(S).operator +(in S)", "s").WithLocation(6, 13),
3090
Diagnostic(ErrorCode.
ERR_EscapeCall
, "+new S()").WithArguments("Extensions.extension(S).operator +(in S)", "s").WithLocation(12, 16),
3096
Diagnostic(ErrorCode.
ERR_EscapeCall
, "+x").WithArguments("Extensions.extension(S).operator +(in S)", "s").WithLocation(18, 13),
3102
Diagnostic(ErrorCode.
ERR_EscapeCall
, "+x").WithArguments("Extensions.extension(S).operator +(in S)", "s").WithLocation(29, 16),
16489
Diagnostic(ErrorCode.
ERR_EscapeCall
, "100 + default(S)").WithArguments("Extensions.extension(S).operator +(in int, S)", "x").WithLocation(6, 13),
16495
Diagnostic(ErrorCode.
ERR_EscapeCall
, "200 + default(S)").WithArguments("Extensions.extension(S).operator +(in int, S)", "x").WithLocation(12, 16),
16501
Diagnostic(ErrorCode.
ERR_EscapeCall
, "x + default(S)").WithArguments("Extensions.extension(S).operator +(in int, S)", "x").WithLocation(18, 13),
16507
Diagnostic(ErrorCode.
ERR_EscapeCall
, "x + default(S)").WithArguments("Extensions.extension(S).operator +(in int, S)", "x").WithLocation(29, 16),
16549
Diagnostic(ErrorCode.
ERR_EscapeCall
, "default(S) + 100").WithArguments("Extensions.extension(S).operator +(S, in int)", "x").WithLocation(6, 13),
16552
Diagnostic(ErrorCode.
ERR_EscapeCall
, "default(S) + 100 + 200").WithArguments("Extensions.extension(S).operator +(S, in int)", "y").WithLocation(6, 13),
16591
Diagnostic(ErrorCode.
ERR_EscapeCall
, "new R(1) + new R(2)").WithArguments("Extensions.extension(R).operator +(scoped R, R)", "y").WithLocation(11, 16),
16594
Diagnostic(ErrorCode.
ERR_EscapeCall
, "new R(2)").WithArguments("R.R(in int)", "i").WithLocation(11, 27),
16633
Diagnostic(ErrorCode.
ERR_EscapeCall
, "new R(1)").WithArguments("R.R(in int)", "i").WithLocation(11, 16),
16636
Diagnostic(ErrorCode.
ERR_EscapeCall
, "new R(1) + new R(2)").WithArguments("Extensions.extension(R).operator +(R, scoped R)", "x").WithLocation(11, 16),
16706
Diagnostic(ErrorCode.
ERR_EscapeCall
, "new R(1)").WithArguments("R.R(in int)", "i").WithLocation(11, 16),
16709
Diagnostic(ErrorCode.
ERR_EscapeCall
, "new R(1) + new R(2)").WithArguments("Extensions.extension(R).operator +(R, R)", "x").WithLocation(11, 16),
16773
Diagnostic(ErrorCode.
ERR_EscapeCall
, "local && global").WithArguments("Extensions.extension(S1).operator &(S1, S1)", "x").WithLocation(22, 18),
16776
Diagnostic(ErrorCode.
ERR_EscapeCall
, "global || local").WithArguments("Extensions.extension(S1).operator |(S1, S1)", "y").WithLocation(25, 16),
16846
Diagnostic(ErrorCode.
ERR_EscapeCall
, "s1 && s2").WithArguments("Extensions.extension(S).operator &(in S, in S)", "x").WithLocation(11, 16),
16895
Diagnostic(ErrorCode.
ERR_EscapeCall
, "new R(1) || new R(2)").WithArguments("Extensions.extension(R).operator |(scoped R, R)", "y").WithLocation(13, 16),
16898
Diagnostic(ErrorCode.
ERR_EscapeCall
, "new R(2)").WithArguments("R.R(in int)", "i").WithLocation(13, 28),
16904
Diagnostic(ErrorCode.
ERR_EscapeCall
, "new R(1) | new R(2)").WithArguments("Extensions.extension(R).operator |(scoped R, R)", "y").WithLocation(18, 16),
16907
Diagnostic(ErrorCode.
ERR_EscapeCall
, "new R(2)").WithArguments("R.R(in int)", "i").WithLocation(18, 27),
16953
Diagnostic(ErrorCode.
ERR_EscapeCall
, "new R(1)").WithArguments("R.R(in int)", "i").WithLocation(13, 16),
16956
Diagnostic(ErrorCode.
ERR_EscapeCall
, "new R(1) || new R(2)").WithArguments("Extensions.extension(R).operator |(R, scoped R)", "x").WithLocation(13, 16),
16962
Diagnostic(ErrorCode.
ERR_EscapeCall
, "new R(1)").WithArguments("R.R(in int)", "i").WithLocation(18, 16),
16965
Diagnostic(ErrorCode.
ERR_EscapeCall
, "new R(1) | new R(2)").WithArguments("Extensions.extension(R).operator |(R, scoped R)", "x").WithLocation(18, 16),
17049
Diagnostic(ErrorCode.
ERR_EscapeCall
, "new R(1)").WithArguments("R.R(in int)", "i").WithLocation(13, 16),
17052
Diagnostic(ErrorCode.
ERR_EscapeCall
, "new R(1) || new R(2)").WithArguments("Extensions.extension(R).operator |(R, R)", "x").WithLocation(13, 16),
17058
Diagnostic(ErrorCode.
ERR_EscapeCall
, "new R(1)").WithArguments("R.R(in int)", "i").WithLocation(18, 16),
17061
Diagnostic(ErrorCode.
ERR_EscapeCall
, "new R(1) | new R(2)").WithArguments("Extensions.extension(R).operator |(R, R)", "x").WithLocation(18, 16),
24578
Diagnostic(ErrorCode.
ERR_EscapeCall
, "c += c1").WithArguments("Extensions.extension(C).operator +(C, C)", "right").WithLocation(7, 9),
24584
Diagnostic(ErrorCode.
ERR_EscapeCall
, "c + c1").WithArguments("Extensions.extension(C).operator +(C, C)", "right").WithLocation(8, 13),
24590
Diagnostic(ErrorCode.
ERR_EscapeCall
, "X(c, c1)").WithArguments("C.X(C, C)", "right").WithLocation(9, 13),
24630
Diagnostic(ErrorCode.
ERR_EscapeCall
, "Y(c += c1)").WithArguments("C.Y(C)", "left").WithLocation(8, 16),
24633
Diagnostic(ErrorCode.
ERR_EscapeCall
, "c += c1").WithArguments("Extensions.extension(C).operator +(C, C)", "right").WithLocation(8, 18),
24636
Diagnostic(ErrorCode.
ERR_EscapeCall
, "c += c1").WithArguments("Extensions.extension(C).operator +(C, C)", "right").WithLocation(8, 18),
24645
Diagnostic(ErrorCode.
ERR_EscapeCall
, "Y(c = X(c, c1))").WithArguments("C.Y(C)", "left").WithLocation(12, 16),
24648
Diagnostic(ErrorCode.
ERR_EscapeCall
, "X(c, c1)").WithArguments("C.X(C, C)", "right").WithLocation(12, 22),
24651
Diagnostic(ErrorCode.
ERR_EscapeCall
, "X(c, c1)").WithArguments("C.X(C, C)", "right").WithLocation(12, 22),
24692
Diagnostic(ErrorCode.
ERR_EscapeCall
, "c += c1").WithArguments("Extensions.extension(C).operator +(scoped C, C)", "right").WithLocation(7, 9),
24698
Diagnostic(ErrorCode.
ERR_EscapeCall
, "c + c1").WithArguments("Extensions.extension(C).operator +(scoped C, C)", "right").WithLocation(8, 13),
24704
Diagnostic(ErrorCode.
ERR_EscapeCall
, "X(c, c1)").WithArguments("C.X(scoped C, C)", "right").WithLocation(9, 13),
24843
Diagnostic(ErrorCode.
ERR_EscapeCall
, "Y(c += c1)").WithArguments("C.Y(C)", "left").WithLocation(8, 16),
24849
Diagnostic(ErrorCode.
ERR_EscapeCall
, "c += c1").WithArguments("Extensions.extension(C).operator +(C, C)", "left").WithLocation(8, 18),
24852
Diagnostic(ErrorCode.
ERR_EscapeCall
, "Y(c = X(c, c1))").WithArguments("C.Y(C)", "left").WithLocation(12, 16),
24855
Diagnostic(ErrorCode.
ERR_EscapeCall
, "X(c, c1)").WithArguments("C.X(C, C)", "left").WithLocation(12, 22),
24895
Diagnostic(ErrorCode.
ERR_EscapeCall
, "Y(c += c1)").WithArguments("C.Y(C)", "left").WithLocation(8, 16),
24901
Diagnostic(ErrorCode.
ERR_EscapeCall
, "c += c1").WithArguments("Extensions.extension(C).operator +(C, scoped C)", "left").WithLocation(8, 18),
24904
Diagnostic(ErrorCode.
ERR_EscapeCall
, "Y(c = X(c, c1))").WithArguments("C.Y(C)", "left").WithLocation(12, 16),
24907
Diagnostic(ErrorCode.
ERR_EscapeCall
, "X(c, c1)").WithArguments("C.X(C, scoped C)", "left").WithLocation(12, 22),
25076
Diagnostic(ErrorCode.
ERR_EscapeCall
, "heapLocal += stackLocal").WithArguments("Extensions.extension(S1).operator +(S1, S1)", "b").WithLocation(16, 9),
25184
Diagnostic(ErrorCode.
ERR_EscapeCall
, "heapLocal += stackLocal").WithArguments("Extensions.extension(S1).operator +(S1, S1)", "b").WithLocation(16, 9),
25193
Diagnostic(ErrorCode.
ERR_EscapeCall
, "heapLocal += heapLocal").WithArguments("Extensions.extension(S3).operator +(in S3, in S3)", "a").WithLocation(50, 9),
25199
Diagnostic(ErrorCode.
ERR_EscapeCall
, "heapLocal += stackLocal").WithArguments("Extensions.extension(S3).operator +(in S3, in S3)", "a").WithLocation(51, 9),
25202
Diagnostic(ErrorCode.
ERR_EscapeCall
, "heapLocal += stackLocal").WithArguments("Extensions.extension(S4).operator +(scoped in S4, scoped in S4)", "b").WithLocation(68, 9),
25547
Diagnostic(ErrorCode.
ERR_EscapeCall
, "X(c += c1)").WithArguments("C.X(C)", "c").WithLocation(7, 16),
25597
Diagnostic(ErrorCode.
ERR_EscapeCall
, "c2 -= 1").WithArguments("Extensions.extension(ref C).operator -(C, in int)", "right").WithLocation(12, 16),
25600
Diagnostic(ErrorCode.
ERR_EscapeCall
, "c2 -= 1").WithArguments("Extensions.extension(ref C).operator -(C, in int)", "right").WithLocation(12, 16),
25615
Diagnostic(ErrorCode.
ERR_EscapeCall
, "c4 -= right").WithArguments("Extensions.extension(ref C).operator -(C, in int)", "right").WithLocation(20, 16),
25659
Diagnostic(ErrorCode.
ERR_EscapeCall
, "c2 -= 1").WithArguments("Extensions.extension(ref C).operator -(C, in int)", "right").WithLocation(12, 16),
25662
Diagnostic(ErrorCode.
ERR_EscapeCall
, "c2 -= 1").WithArguments("Extensions.extension(ref C).operator -(C, in int)", "right").WithLocation(12, 16),
25671
Diagnostic(ErrorCode.
ERR_EscapeCall
, "c4 -= right").WithArguments("Extensions.extension(ref C).operator -(C, in int)", "right").WithLocation(20, 16),
Semantics\ExtensionTests.cs (27)
23769
Diagnostic(ErrorCode.
ERR_EscapeCall
, @"new MyStruct() { i = ref i }.M($"""")").WithArguments("E.extension(MyStruct).M(InterpolationHandler)", "s1").WithLocation(6, 12)
23820
Diagnostic(ErrorCode.
ERR_EscapeCall
, @"myStruct.M($"""")").WithArguments("E.extension(MyStruct).M(ref InterpolationHandler)", "h").WithLocation(6, 12),
23874
Diagnostic(ErrorCode.
ERR_EscapeCall
, @"new MyStruct() { i = ref i }.M($"""")").WithArguments("E.extension(MyStruct).M(ref InterpolationHandler)", "s1").WithLocation(6, 12),
23931
Diagnostic(ErrorCode.
ERR_EscapeCall
, @"new MyStruct() { i = ref i }.M($"""")").WithArguments("E.extension(scoped MyStruct).M(InterpolationHandler)", "h").WithLocation(6, 12),
23934
Diagnostic(ErrorCode.
ERR_EscapeCall
, @"$""""").WithArguments("InterpolationHandler.InterpolationHandler(int, int, MyStruct)", "s2").WithLocation(6, 43)
45291
Diagnostic(ErrorCode.
ERR_EscapeCall
, "i.M()").WithArguments("E.extension(ref int).M()", "i").WithLocation(6, 20),
45294
Diagnostic(ErrorCode.
ERR_EscapeCall
, "E.M(ref i)").WithArguments("E.M(ref int)", "i").WithLocation(12, 20),
45337
Diagnostic(ErrorCode.
ERR_EscapeCall
, "ri.M()").WithArguments("E.extension(ref int).M()", "i").WithLocation(7, 20),
45340
Diagnostic(ErrorCode.
ERR_EscapeCall
, "E.M(ref ri)").WithArguments("E.M(ref int)", "i").WithLocation(14, 20),
45416
Diagnostic(ErrorCode.
ERR_EscapeCall
, "a.M(ref b)").WithArguments("E.extension(ref int).M(ref int)", "j").WithLocation(6, 20),
45425
Diagnostic(ErrorCode.
ERR_EscapeCall
, "b.M(ref a)").WithArguments("E.extension(ref int).M(ref int)", "i").WithLocation(11, 20),
45428
Diagnostic(ErrorCode.
ERR_EscapeCall
, "E.M(ref a, ref b)").WithArguments("E.M(ref int, ref int)", "j").WithLocation(16, 20),
45714
Diagnostic(ErrorCode.
ERR_EscapeCall
, "t.F8(out u)").WithArguments("E.extension(in int).F8(out int)", "t").WithLocation(7, 20),
45717
Diagnostic(ErrorCode.
ERR_EscapeCall
, "E.F8(t, out u)").WithArguments("E.F8(in int, out int)", "t").WithLocation(13, 20),
45723
Diagnostic(ErrorCode.
ERR_EscapeCall
, "E.F8(in t, out u)").WithArguments("E.F8(in int, out int)", "t").WithLocation(19, 20),
46009
Diagnostic(ErrorCode.
ERR_EscapeCall
, "i.P").WithArguments("E.extension(ref int).P", "i").WithLocation(6, 20),
46012
Diagnostic(ErrorCode.
ERR_EscapeCall
, "E.get_P(ref i)").WithArguments("E.get_P(ref int)", "i").WithLocation(12, 20),
46055
Diagnostic(ErrorCode.
ERR_EscapeCall
, "ri.P").WithArguments("E.extension(ref int).P", "i").WithLocation(7, 20),
46058
Diagnostic(ErrorCode.
ERR_EscapeCall
, "E.get_P(ref ri)").WithArguments("E.get_P(ref int)", "i").WithLocation(14, 20),
46188
Diagnostic(ErrorCode.
ERR_EscapeCall
, "x.Property").WithArguments("E.extension(S).Property", "s").WithLocation(24, 13),
46191
Diagnostic(ErrorCode.
ERR_EscapeCall
, "E.get_Property(x)").WithArguments("E.get_Property(S)", "s").WithLocation(26, 13),
46212
Diagnostic(ErrorCode.
ERR_EscapeCall
, "x.RefReceiverProperty").WithArguments("E.extension(ref S).RefReceiverProperty", "s").WithLocation(30, 13),
46215
Diagnostic(ErrorCode.
ERR_EscapeCall
, "E.get_RefReceiverProperty(ref x)").WithArguments("E.get_RefReceiverProperty(ref S)", "s").WithLocation(31, 13),
46278
Diagnostic(ErrorCode.
ERR_EscapeCall
, "x.RefReceiverProperty").WithArguments("E.extension(ref S).RefReceiverProperty", "s").WithLocation(29, 13),
46284
Diagnostic(ErrorCode.
ERR_EscapeCall
, "E.get_RefReceiverProperty(ref x)").WithArguments("E.get_RefReceiverProperty(ref S)", "s").WithLocation(31, 13),
46361
Diagnostic(ErrorCode.
ERR_EscapeCall
, "E.get_Item(ref x, 1.0)").WithArguments("E.get_Item(ref S, double)", "s").WithLocation(31, 13),
46435
Diagnostic(ErrorCode.
ERR_EscapeCall
, "E.get_Item(ref x, 1.0)").WithArguments("E.get_Item(ref S, double)", "s").WithLocation(31, 13),
Semantics\InlineArrayTests.cs (1)
9176
Diagnostic(ErrorCode.
ERR_EscapeCall
, "M3(x)").WithArguments("Program.M3(System.Span<int>)", "x").WithLocation(7, 16),
Semantics\PatternMatchingTests3.cs (1)
505
Diagnostic(ErrorCode.
ERR_EscapeCall
, "new RGBColor(span)").WithArguments("Program.RGBColor.RGBColor(System.Span<int>)", "span").WithLocation(17, 18),
Semantics\PrimaryConstructorTests.cs (1)
15835
Diagnostic(ErrorCode.
ERR_EscapeCall
, "M2(ref x)").WithArguments("C1.M2(ref int)", "x").WithLocation(4, 25),
Symbols\UserDefinedCompoundAssignmentOperatorsTests.cs (7)
15792
Diagnostic(ErrorCode.
ERR_EscapeCall
, "X(c += c1)").WithArguments("C.X(C)", "c").WithLocation(7, 16),
15835
Diagnostic(ErrorCode.
ERR_EscapeCall
, "c2 -= 1").WithArguments("C.operator -(C, in int)", "right").WithLocation(12, 16),
15838
Diagnostic(ErrorCode.
ERR_EscapeCall
, "c2 -= 1").WithArguments("C.operator -(C, in int)", "right").WithLocation(12, 16),
15853
Diagnostic(ErrorCode.
ERR_EscapeCall
, "c4 -= right").WithArguments("C.operator -(C, in int)", "right").WithLocation(20, 16),
15896
Diagnostic(ErrorCode.
ERR_EscapeCall
, "c2 -= 1").WithArguments("C.operator -(C, in int)", "right").WithLocation(12, 16),
15899
Diagnostic(ErrorCode.
ERR_EscapeCall
, "c2 -= 1").WithArguments("C.operator -(C, in int)", "right").WithLocation(12, 16),
15908
Diagnostic(ErrorCode.
ERR_EscapeCall
, "c4 -= right").WithArguments("C.operator -(C, in int)", "right").WithLocation(20, 16),
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (376)
Semantics\IndexAndRangeTests.cs (15)
1911
Diagnostic(ErrorCode.
ERR_EscapeCall
, "new Index(s1)").WithArguments("System.Index.Index(System.Span<int>)", "x").WithLocation(28, 16),
1917
Diagnostic(ErrorCode.
ERR_EscapeCall
, "Range.StartAt(new Index(s2))").WithArguments("System.Range.StartAt(System.Index)", "start").WithLocation(34, 16),
1920
Diagnostic(ErrorCode.
ERR_EscapeCall
, "new Index(s2)").WithArguments("System.Index.Index(System.Span<int>)", "x").WithLocation(34, 30),
1926
Diagnostic(ErrorCode.
ERR_EscapeCall
, "new Index(s3)").WithArguments("System.Index.Index(System.Span<int>)", "x").WithLocation(40, 18),
1932
Diagnostic(ErrorCode.
ERR_EscapeCall
, "Range.EndAt(new Index(s4))").WithArguments("System.Range.EndAt(System.Index)", "end").WithLocation(46, 16),
1935
Diagnostic(ErrorCode.
ERR_EscapeCall
, "new Index(s4)").WithArguments("System.Index.Index(System.Span<int>)", "x").WithLocation(46, 28),
1941
Diagnostic(ErrorCode.
ERR_EscapeCall
, "new Index(s52)").WithArguments("System.Index.Index(System.Span<int>)", "x").WithLocation(52, 34),
1947
Diagnostic(ErrorCode.
ERR_EscapeCall
, "new Range(new Index(s61), new Index(s62))").WithArguments("System.Range.Range(System.Index, System.Index)", "end").WithLocation(58, 16),
1950
Diagnostic(ErrorCode.
ERR_EscapeCall
, "new Index(s62)").WithArguments("System.Index.Index(System.Span<int>)", "x").WithLocation(58, 42),
1956
Diagnostic(ErrorCode.
ERR_EscapeCall
, "new Index(s71)").WithArguments("System.Index.Index(System.Span<int>)", "x").WithLocation(64, 16),
1962
Diagnostic(ErrorCode.
ERR_EscapeCall
, "new Range(new Index(s81), new Index(s82))").WithArguments("System.Range.Range(System.Index, System.Index)", "start").WithLocation(70, 16),
1965
Diagnostic(ErrorCode.
ERR_EscapeCall
, "new Index(s81)").WithArguments("System.Index.Index(System.Span<int>)", "x").WithLocation(70, 26),
1971
Diagnostic(ErrorCode.
ERR_EscapeCall
, "new Index(s91)").WithArguments("System.Index.Index(System.Span<int>)", "x").WithLocation(77, 16),
1977
Diagnostic(ErrorCode.
ERR_EscapeCall
, "new Range(new Index(s101), new Index(s102))").WithArguments("System.Range.Range(System.Index, System.Index)", "start").WithLocation(84, 16),
1980
Diagnostic(ErrorCode.
ERR_EscapeCall
, "new Index(s101)").WithArguments("System.Index.Index(System.Span<int>)", "x").WithLocation(84, 26),
Semantics\InterpolationTests.cs (16)
14946
Diagnostic(ErrorCode.
ERR_EscapeCall
, "{s}").WithArguments("CustomHandler.AppendFormatted(System.Span<char>)", "s").WithLocation(17, 18),
15108
Diagnostic(ErrorCode.
ERR_EscapeCall
, "{s}").WithArguments("CustomHandler.AppendFormatted(System.Span<char>)", "s").WithLocation(17, 22),
15123
Diagnostic(ErrorCode.
ERR_EscapeCall
, expression).WithArguments("CustomHandler.CustomHandler(int, int, ref S1)", "s1").WithLocation(17, 20));
15309
Diagnostic(ErrorCode.
ERR_EscapeCall
, "{s2}").WithArguments("CustomHandler.AppendFormatted(System.Span<char>)", "s").WithLocation(15, 22),
15328
Diagnostic(ErrorCode.
ERR_EscapeCall
, @"$""{s2}""").WithArguments("CustomHandler.CustomHandler(int, int, ref S1)", "s1").WithLocation(15, 20)
15373
Diagnostic(ErrorCode.
ERR_EscapeCall
, @"$""{1}""").WithArguments("CustomHandler.CustomHandler(int, int, ref S)", "s").WithLocation(17, 18));
15583
Diagnostic(ErrorCode.
ERR_EscapeCall
, "{i}").WithArguments("CustomHandler.AppendFormatted(in int)", "i").WithLocation(13, 18),
15589
Diagnostic(ErrorCode.
ERR_EscapeCall
, "{2}").WithArguments("CustomHandler.AppendFormatted(in int)", "i").WithLocation(17, 18),
15754
Diagnostic(ErrorCode.
ERR_EscapeCall
, @"$""{1}""").WithArguments("CustomHandler.CustomHandler(int, int, ref R)", "r").WithLocation(18, 22));
15796
Diagnostic(ErrorCode.
ERR_EscapeCall
, @"$""{1}""").WithArguments("CustomHandler.CustomHandler(int, int, ref R)", "r").WithLocation(18, 28));
15831
Diagnostic(ErrorCode.
ERR_EscapeCall
, @"$""{1}""").WithArguments("CustomHandler.CustomHandler(int, int, in int)", "i").WithLocation(13, 16),
15871
Diagnostic(ErrorCode.
ERR_EscapeCall
, "{1}").WithArguments("CustomHandler.AppendFormatted(int, in int)", "y").WithLocation(14, 18),
16168
Diagnostic(ErrorCode.
ERR_EscapeCall
, @"r
16172
Diagnostic(ErrorCode.
ERR_EscapeCall
, "{span}").WithArguments("CustomHandler.AppendFormatted(System.Span<byte>)", "span").WithLocation(10, 18),
16175
Diagnostic(ErrorCode.
ERR_EscapeCall
, "{span}").WithArguments("CustomHandler.AppendFormatted(System.Span<byte>)", "span").WithLocation(10, 18),
16315
Diagnostic(ErrorCode.
ERR_EscapeCall
, @"$""{1}""").WithArguments("CustomHandler.CustomHandler(int, int, ref R)", "r").WithLocation(26, 52));
Semantics\RawInterpolationTests_Handler.cs (3)
11020
Diagnostic(ErrorCode.
ERR_EscapeCall
, "{s}").WithArguments("CustomHandler.AppendFormatted(System.Span<char>)", "s").WithLocation(17, 20),
11138
Diagnostic(ErrorCode.
ERR_EscapeCall
, "{s}").WithArguments("CustomHandler.AppendFormatted(System.Span<char>)", "s").WithLocation(17, 24),
11327
Diagnostic(ErrorCode.
ERR_EscapeCall
, "{s2}").WithArguments("CustomHandler.AppendFormatted(System.Span<char>)", "s").WithLocation(15, 24),
Semantics\RecordStructTests.cs (1)
8055
Diagnostic(ErrorCode.
ERR_EscapeCall
, "MayWrap(ref local)").WithArguments("Program.MayWrap(ref System.Span<int>)", "arg").WithLocation(9, 14));
Semantics\RefEscapingTests.cs (150)
244
Diagnostic(ErrorCode.
ERR_EscapeCall
, "MayWrap(ref local)").WithArguments("Program.MayWrap(ref System.Span<int>)", "arg").WithLocation(23, 30),
247
Diagnostic(ErrorCode.
ERR_EscapeCall
, "Test1(MayWrap(ref local))").WithArguments("Program.Test1(Program.S1)", "arg").WithLocation(23, 24)
293
Diagnostic(ErrorCode.
ERR_EscapeCall
, "Test1(sp)").WithArguments("Program.Test1(Program.S1)", "arg").WithLocation(24, 24)
344
Diagnostic(ErrorCode.
ERR_EscapeCall
, "Test1(ref sp)").WithArguments("Program.Test1(ref Program.S1)", "arg").WithLocation(23, 24),
350
Diagnostic(ErrorCode.
ERR_EscapeCall
, "Test1(ref sp)").WithArguments("Program.Test1(ref Program.S1)", "arg").WithLocation(29, 24)
360
Diagnostic(ErrorCode.
ERR_EscapeCall
, "Test1(ref sp)").WithArguments("Program.Test1(ref Program.S1)", "arg").WithLocation(23, 24),
366
Diagnostic(ErrorCode.
ERR_EscapeCall
, "Test1(ref sp)").WithArguments("Program.Test1(ref Program.S1)", "arg").WithLocation(29, 24)
478
Diagnostic(ErrorCode.
ERR_EscapeCall
, "Test1(sp)").WithArguments("Program.Test1(Program.S1)", "arg").WithLocation(31, 24),
523
Diagnostic(ErrorCode.
ERR_EscapeCall
, "Test1(MayNotWrap())").WithArguments("Program.Test1(Program.S1)", "arg").WithLocation(21, 24),
529
Diagnostic(ErrorCode.
ERR_EscapeCall
, "MayNotWrap()").WithArguments("Program.MayNotWrap(in int)", "arg").WithLocation(21, 30));
574
Diagnostic(ErrorCode.
ERR_EscapeCall
, "MayWrap(inner)").WithArguments("Program.MayWrap(System.Span<int>)", "arg").WithLocation(18, 21)
620
Diagnostic(ErrorCode.
ERR_EscapeCall
, "MayWrap(__arglist(inner))").WithArguments("Program.MayWrap(__arglist)", "__arglist").WithLocation(18, 17)
681
Diagnostic(ErrorCode.
ERR_EscapeCall
, "ReturnsRefSpan1(__arglist(ref local))").WithArguments("Program.ReturnsRefSpan1(__arglist)", "__arglist").WithLocation(32, 20)
767
Diagnostic(ErrorCode.
ERR_EscapeCall
, "local && global").WithArguments("S1.operator &(S1, S1)", "x").WithLocation(22, 18),
770
Diagnostic(ErrorCode.
ERR_EscapeCall
, "global || local").WithArguments("S1.operator |(S1, S1)", "y").WithLocation(25, 16),
807
Diagnostic(ErrorCode.
ERR_EscapeCall
, "ReturnsRef1(out var _)").WithArguments("Program.ReturnsRef1(out int)", "x").WithLocation(12, 20)
843
Diagnostic(ErrorCode.
ERR_EscapeCall
, "ReturnsRef1(out var _)").WithArguments("Program.ReturnsRef1(out int)", "x").WithLocation(7, 20),
893
Diagnostic(ErrorCode.
ERR_EscapeCall
, "ReturnsRef(out var z)").WithArguments("Program.ReturnsRef(out int)", "x").WithLocation(12, 20),
899
Diagnostic(ErrorCode.
ERR_EscapeCall
, "ReturnsRef(out z)").WithArguments("Program.ReturnsRef(out int)", "x").WithLocation(17, 20)
1803
Diagnostic(ErrorCode.
ERR_EscapeCall
, "MayWrap(ref inner)").WithArguments("Program.MayWrap(ref System.Span<int>)", "arg").WithLocation(19, 21)
1813
Diagnostic(ErrorCode.
ERR_EscapeCall
, "MayWrap(ref outer)").WithArguments("Program.MayWrap(ref System.Span<int>)", "arg").WithLocation(16, 21),
1819
Diagnostic(ErrorCode.
ERR_EscapeCall
, "MayWrap(ref inner)").WithArguments("Program.MayWrap(ref System.Span<int>)", "arg").WithLocation(19, 21)
1872
Diagnostic(ErrorCode.
ERR_EscapeCall
, "MayWrap(ref inner)").WithArguments("Program.MayWrap(ref System.Span<int>)", "arg").WithLocation(21, 21)
1936
Diagnostic(ErrorCode.
ERR_EscapeCall
, "MayWrap(ref inner)").WithArguments("Program.MayWrap(ref System.Span<int>)", "arg").WithLocation(20, 20),
1942
Diagnostic(ErrorCode.
ERR_EscapeCall
, "MayWrap(ref inner)").WithArguments("Program.MayWrap(ref System.Span<int>)", "arg").WithLocation(25, 20),
1948
Diagnostic(ErrorCode.
ERR_EscapeCall
, "MayWrap(ref inner)").WithArguments("Program.MayWrap(ref System.Span<int>)", "arg").WithLocation(28, 38));
2000
Diagnostic(ErrorCode.
ERR_EscapeCall
, "MayWrap(inner)").WithArguments("Program.MayWrap(System.Span<int>)", "arg").WithLocation(18, 23)
2174
Diagnostic(ErrorCode.
ERR_EscapeCall
, "MayWrap(ref arg1)").WithArguments("Program.MayWrap(ref System.Span<int>)", "arg").WithLocation(28, 20)
2507
Diagnostic(ErrorCode.
ERR_EscapeCall
, "MayWrap(arg1)").WithArguments("Program.MayWrap(in System.Span<int>)", "arg").WithLocation(44, 24),
2513
Diagnostic(ErrorCode.
ERR_EscapeCall
, "MayWrap(arg1.field)").WithArguments("Program.MayWrap(in System.Span<int>)", "arg").WithLocation(54, 24)
2606
Diagnostic(ErrorCode.
ERR_EscapeCall
, "MayWrap(ref arg1)").WithArguments("Program.MayWrap(ref System.Span<int>)", "arg").WithLocation(34, 20)
4000
Diagnostic(ErrorCode.
ERR_EscapeCall
, "new S1(stackSpan) { [0] = stackSpan }").WithArguments("S1.S1(System.Span<int>)", "span").WithLocation(14, 17),
4006
Diagnostic(ErrorCode.
ERR_EscapeCall
, "new S1(stackSpan) { [0] = heapSpan }").WithArguments("S1.S1(System.Span<int>)", "span").WithLocation(15, 17),
4021
Diagnostic(ErrorCode.
ERR_EscapeCall
, "new S3(stackSpan) { [0] = stackSpan }").WithArguments("S3.S3(System.Span<int>)", "span").WithLocation(50, 17),
4027
Diagnostic(ErrorCode.
ERR_EscapeCall
, "new S3(stackSpan) { [0] = heapSpan }").WithArguments("S3.S3(System.Span<int>)", "span").WithLocation(51, 17),
4451
Diagnostic(ErrorCode.
ERR_EscapeCall
, "local").WithArguments(method, "x").WithLocation(8, 26),
4460
Diagnostic(ErrorCode.
ERR_EscapeCall
, "1").WithArguments(method, "x").WithLocation(17, 26),
4466
Diagnostic(ErrorCode.
ERR_EscapeCall
, "1").WithArguments(method, "x").WithLocation(21, 26));
4529
Diagnostic(ErrorCode.
ERR_EscapeCall
, "local").WithArguments("R.Add(in int)", "x").WithLocation(21, 23),
4601
Diagnostic(ErrorCode.
ERR_EscapeCall
, "{ x, y }").WithArguments("R.Add(in int, in int)", "y").WithLocation(33, 26),
4721
Diagnostic(ErrorCode.
ERR_EscapeCall
, "local").WithArguments("R.Add(in int)", "x").WithLocation(12, 24),
6162
Diagnostic(ErrorCode.
ERR_EscapeCall
, "new R(local)").WithArguments("R.R(in int)", "a").WithLocation(12, 16),
6284
Diagnostic(ErrorCode.
ERR_EscapeCall
, "new R(1)").WithArguments("R.R(in int)", "a").WithLocation(10, 16),
6329
Diagnostic(ErrorCode.
ERR_EscapeCall
, "new R(local)").WithArguments("R.R(in int)", "a").WithLocation(12, 13),
6372
Diagnostic(ErrorCode.
ERR_EscapeCall
, "new R(1)").WithArguments("R.R(in int)", "a").WithLocation(10, 13),
6583
Diagnostic(ErrorCode.
ERR_EscapeCall
, "new R(local) { local }").WithArguments("R.R(in int)", "a").WithLocation(12, 16),
6626
Diagnostic(ErrorCode.
ERR_EscapeCall
, "new R(1) { 1 }").WithArguments("R.R(in int)", "a").WithLocation(10, 16),
6671
Diagnostic(ErrorCode.
ERR_EscapeCall
, "new R(local) { local }").WithArguments("R.R(in int)", "a").WithLocation(12, 13),
6714
Diagnostic(ErrorCode.
ERR_EscapeCall
, "new R(1) { 1 }").WithArguments("R.R(in int)", "a").WithLocation(10, 13),
6759
Diagnostic(ErrorCode.
ERR_EscapeCall
, "new R(local) { 1 }").WithArguments("R.R(in int)", "a").WithLocation(12, 16),
6804
Diagnostic(ErrorCode.
ERR_EscapeCall
, "new R(1) { local }").WithArguments("R.R(in int)", "a").WithLocation(12, 16),
6849
Diagnostic(ErrorCode.
ERR_EscapeCall
, "new R(local) { 1 }").WithArguments("R.R(in int)", "a").WithLocation(12, 13),
6894
Diagnostic(ErrorCode.
ERR_EscapeCall
, "new R(1) { local }").WithArguments("R.R(in int)", "a").WithLocation(12, 13),
6988
Diagnostic(ErrorCode.
ERR_EscapeCall
, "new R(ref a)").WithArguments("R.R(ref int)", "a").WithLocation(10, 16));
7370
Diagnostic(ErrorCode.
ERR_EscapeCall
, "{local}").WithArguments("R.AppendFormatted(in int)", "x").WithLocation(8, 18),
7379
Diagnostic(ErrorCode.
ERR_EscapeCall
, "{1}").WithArguments("R.AppendFormatted(in int)", "x").WithLocation(17, 18),
7385
Diagnostic(ErrorCode.
ERR_EscapeCall
, "{2}").WithArguments("R.AppendFormatted(in int)", "x").WithLocation(21, 27),
7391
Diagnostic(ErrorCode.
ERR_EscapeCall
, "{local}").WithArguments("R.AppendFormatted(in int)", "x").WithLocation(26, 25),
7400
Diagnostic(ErrorCode.
ERR_EscapeCall
, "abc").WithArguments("R.AppendLiteral(in string)", "x").WithLocation(30, 18));
7448
Diagnostic(ErrorCode.
ERR_EscapeCall
, "{local}").WithArguments("R.AppendFormatted(in int)", "x").WithLocation(21, 15),
7457
Diagnostic(ErrorCode.
ERR_EscapeCall
, "abc").WithArguments("R.AppendLiteral(in string)", "x").WithLocation(25, 18));
7625
Diagnostic(ErrorCode.
ERR_EscapeCall
, "MayWrap(ref arg1)").WithArguments("Program.MayWrap(ref System.Span<int>)", "arg").WithLocation(28, 20)
7674
Diagnostic(ErrorCode.
ERR_EscapeCall
, "MayWrap(arg2)").WithArguments("Program.MayWrap(in System.Span<int>)", "arg").WithLocation(25, 20),
8013
Diagnostic(ErrorCode.
ERR_EscapeCall
, "MayWrap(ref local)").WithArguments("Program.MayWrap(ref System.Span<int>)", "arg").WithLocation(16, 18),
11460
Diagnostic(ErrorCode.
ERR_EscapeCall
, "new S(xyzw2)").WithArguments("S.S(System.Span<float>)", "x").WithLocation(18, 25),
11466
Diagnostic(ErrorCode.
ERR_EscapeCall
, "new S(xyzw3)").WithArguments("S.S(System.Span<float>)", "x").WithLocation(26, 17),
11472
Diagnostic(ErrorCode.
ERR_EscapeCall
, "new S(xyzw4)").WithArguments("S.S(System.Span<float>)", "x").WithLocation(33, 13),
11522
Diagnostic(ErrorCode.
ERR_EscapeCall
, "new S(ReadOnlyVec.Self2())").WithArguments("S.S(System.Span<float>)", "x").WithLocation(11, 45),
11528
Diagnostic(ErrorCode.
ERR_EscapeCall
, "new S(ReadOnlyVec.Self2())").WithArguments("S.S(System.Span<float>)", "x").WithLocation(12, 25),
11578
Diagnostic(ErrorCode.
ERR_EscapeCall
, "new S(ReadOnlyVec.Self2())").WithArguments("S.S(System.Span<float>)", "x").WithLocation(11, 52),
11584
Diagnostic(ErrorCode.
ERR_EscapeCall
, "new S(ReadOnlyVec.Self2())").WithArguments("S.S(System.Span<float>)", "x").WithLocation(12, 32),
11651
Diagnostic(ErrorCode.
ERR_EscapeCall
, "new S(xyz2)").WithArguments("S.S(System.Span<float>)", "x").WithLocation(21, 29),
11657
Diagnostic(ErrorCode.
ERR_EscapeCall
, "new S(xyz3)").WithArguments("S.S(System.Span<float>)", "x").WithLocation(29, 21),
11981
Diagnostic(ErrorCode.
ERR_EscapeCall
, "new RS(ref __refvalue(ai.GetNextArg(), int))").WithArguments("RS.RS(ref int)", "i").WithLocation(17, 15),
12058
Diagnostic(ErrorCode.
ERR_EscapeCall
, "F1(out int i)").WithArguments("Program.F1(out int)", "i").WithLocation(12, 20),
12467
Diagnostic(ErrorCode.
ERR_EscapeCall
, "(S)100").WithArguments("S.explicit operator S(in int)", "x").WithLocation(6, 13),
12473
Diagnostic(ErrorCode.
ERR_EscapeCall
, "(S)200").WithArguments("S.explicit operator S(in int)", "x").WithLocation(12, 16),
12479
Diagnostic(ErrorCode.
ERR_EscapeCall
, "(S)x").WithArguments("S.explicit operator S(in int)", "x").WithLocation(18, 13),
12485
Diagnostic(ErrorCode.
ERR_EscapeCall
, "(S)x").WithArguments("S.explicit operator S(in int)", "x").WithLocation(29, 16),
12569
Diagnostic(ErrorCode.
ERR_EscapeCall
, "100").WithArguments("S.implicit operator S(in int)", "x").WithLocation(6, 13),
12575
Diagnostic(ErrorCode.
ERR_EscapeCall
, "200").WithArguments("S.implicit operator S(in int)", "x").WithLocation(12, 16),
12581
Diagnostic(ErrorCode.
ERR_EscapeCall
, "x").WithArguments("S.implicit operator S(in int)", "x").WithLocation(18, 13),
12587
Diagnostic(ErrorCode.
ERR_EscapeCall
, "x").WithArguments("S.implicit operator S(in int)", "x").WithLocation(29, 16),
12623
Diagnostic(ErrorCode.
ERR_EscapeCall
, "(S2)s1").WithArguments("S2.implicit operator S2(S1)", "s1").WithLocation(7, 16),
12736
Diagnostic(ErrorCode.
ERR_EscapeCall
, "100").WithArguments("S.implicit operator S(in int?)", "x").WithLocation(6, 13),
12742
Diagnostic(ErrorCode.
ERR_EscapeCall
, "200").WithArguments("S.implicit operator S(in int?)", "x").WithLocation(12, 16),
12748
Diagnostic(ErrorCode.
ERR_EscapeCall
, "x").WithArguments("S.implicit operator S(in int?)", "x").WithLocation(18, 13),
12754
Diagnostic(ErrorCode.
ERR_EscapeCall
, "x").WithArguments("S.implicit operator S(in int?)", "x").WithLocation(24, 16),
12760
Diagnostic(ErrorCode.
ERR_EscapeCall
, "x").WithArguments("S.implicit operator S(in int?)", "x").WithLocation(29, 16),
12825
Diagnostic(ErrorCode.
ERR_EscapeCall
, "M2(x)").WithArguments("C.M2(S)", "s").WithLocation(5, 16),
12831
Diagnostic(ErrorCode.
ERR_EscapeCall
, "x").WithArguments("S.implicit operator S(in int)", "x").WithLocation(5, 19));
12856
Diagnostic(ErrorCode.
ERR_EscapeCall
, "M2(x)").WithArguments("C.M2(in S)", "s").WithLocation(5, 20),
12884
Diagnostic(ErrorCode.
ERR_EscapeCall
, "M2(x)").WithArguments("C.M2(in S)", "s").WithLocation(5, 20),
12958
Diagnostic(ErrorCode.
ERR_EscapeCall
, "M2(x)").WithArguments("C.M2(in S)", "s").WithLocation(5, 20),
13039
Diagnostic(ErrorCode.
ERR_EscapeCall
, "100 + default(S)").WithArguments("S.operator +(in int, S)", "x").WithLocation(6, 13),
13045
Diagnostic(ErrorCode.
ERR_EscapeCall
, "200 + default(S)").WithArguments("S.operator +(in int, S)", "x").WithLocation(12, 16),
13051
Diagnostic(ErrorCode.
ERR_EscapeCall
, "x + default(S)").WithArguments("S.operator +(in int, S)", "x").WithLocation(18, 13),
13057
Diagnostic(ErrorCode.
ERR_EscapeCall
, "x + default(S)").WithArguments("S.operator +(in int, S)", "x").WithLocation(29, 16),
13088
Diagnostic(ErrorCode.
ERR_EscapeCall
, "default(S) + 100").WithArguments("S.operator +(S, in int)", "x").WithLocation(6, 13),
13091
Diagnostic(ErrorCode.
ERR_EscapeCall
, "default(S) + 100 + 200").WithArguments("S.operator +(S, in int)", "y").WithLocation(6, 13),
13118
Diagnostic(ErrorCode.
ERR_EscapeCall
, "new R(1) + new R(2)").WithArguments("R.operator +(scoped R, R)", "y").WithLocation(11, 16),
13121
Diagnostic(ErrorCode.
ERR_EscapeCall
, "new R(2)").WithArguments("R.R(in int)", "i").WithLocation(11, 27),
13148
Diagnostic(ErrorCode.
ERR_EscapeCall
, "new R(1)").WithArguments("R.R(in int)", "i").WithLocation(11, 16),
13151
Diagnostic(ErrorCode.
ERR_EscapeCall
, "new R(1) + new R(2)").WithArguments("R.operator +(R, scoped R)", "x").WithLocation(11, 16),
13199
Diagnostic(ErrorCode.
ERR_EscapeCall
, "new R(1)").WithArguments("R.R(in int)", "i").WithLocation(11, 16),
13202
Diagnostic(ErrorCode.
ERR_EscapeCall
, "new R(1) + new R(2)").WithArguments("R.operator +(R, R)", "x").WithLocation(11, 16),
13228
Diagnostic(ErrorCode.
ERR_EscapeCall
, "c += c1").WithArguments("C.operator +(C, C)", "right").WithLocation(7, 9),
13234
Diagnostic(ErrorCode.
ERR_EscapeCall
, "c + c1").WithArguments("C.operator +(C, C)", "right").WithLocation(8, 13),
13240
Diagnostic(ErrorCode.
ERR_EscapeCall
, "X(c, c1)").WithArguments("C.X(C, C)", "right").WithLocation(9, 13),
13268
Diagnostic(ErrorCode.
ERR_EscapeCall
, "Y(c += c1)").WithArguments("C.Y(C)", "left").WithLocation(8, 16),
13271
Diagnostic(ErrorCode.
ERR_EscapeCall
, "c += c1").WithArguments("C.operator +(C, C)", "right").WithLocation(8, 18),
13274
Diagnostic(ErrorCode.
ERR_EscapeCall
, "c += c1").WithArguments("C.operator +(C, C)", "right").WithLocation(8, 18),
13283
Diagnostic(ErrorCode.
ERR_EscapeCall
, "Y(c = X(c, c1))").WithArguments("C.Y(C)", "left").WithLocation(12, 16),
13286
Diagnostic(ErrorCode.
ERR_EscapeCall
, "X(c, c1)").WithArguments("C.X(C, C)", "right").WithLocation(12, 22),
13289
Diagnostic(ErrorCode.
ERR_EscapeCall
, "X(c, c1)").WithArguments("C.X(C, C)", "right").WithLocation(12, 22),
13319
Diagnostic(ErrorCode.
ERR_EscapeCall
, "c += c1").WithArguments("C.operator +(scoped C, C)", "right").WithLocation(7, 9),
13325
Diagnostic(ErrorCode.
ERR_EscapeCall
, "c + c1").WithArguments("C.operator +(scoped C, C)", "right").WithLocation(8, 13),
13331
Diagnostic(ErrorCode.
ERR_EscapeCall
, "X(c, c1)").WithArguments("C.X(scoped C, C)", "right").WithLocation(9, 13),
13425
Diagnostic(ErrorCode.
ERR_EscapeCall
, "Y(c += c1)").WithArguments("C.Y(C)", "left").WithLocation(8, 16),
13431
Diagnostic(ErrorCode.
ERR_EscapeCall
, "c += c1").WithArguments("C.operator +(C, C)", "left").WithLocation(8, 18),
13434
Diagnostic(ErrorCode.
ERR_EscapeCall
, "Y(c = X(c, c1))").WithArguments("C.Y(C)", "left").WithLocation(12, 16),
13437
Diagnostic(ErrorCode.
ERR_EscapeCall
, "X(c, c1)").WithArguments("C.X(C, C)", "left").WithLocation(12, 22),
13466
Diagnostic(ErrorCode.
ERR_EscapeCall
, "Y(c += c1)").WithArguments("C.Y(C)", "left").WithLocation(8, 16),
13472
Diagnostic(ErrorCode.
ERR_EscapeCall
, "c += c1").WithArguments("C.operator +(C, scoped C)", "left").WithLocation(8, 18),
13475
Diagnostic(ErrorCode.
ERR_EscapeCall
, "Y(c = X(c, c1))").WithArguments("C.Y(C)", "left").WithLocation(12, 16),
13478
Diagnostic(ErrorCode.
ERR_EscapeCall
, "X(c, c1)").WithArguments("C.X(C, scoped C)", "left").WithLocation(12, 22),
13598
Diagnostic(ErrorCode.
ERR_EscapeCall
, "heapLocal += stackLocal").WithArguments("S1.operator +(S1, S1)", "b").WithLocation(16, 9),
13685
Diagnostic(ErrorCode.
ERR_EscapeCall
, "heapLocal += stackLocal").WithArguments("S1.operator +(S1, S1)", "b").WithLocation(16, 9),
13694
Diagnostic(ErrorCode.
ERR_EscapeCall
, "heapLocal += heapLocal").WithArguments("S3.operator +(in S3, in S3)", "a").WithLocation(50, 9),
13700
Diagnostic(ErrorCode.
ERR_EscapeCall
, "heapLocal += stackLocal").WithArguments("S3.operator +(in S3, in S3)", "a").WithLocation(51, 9),
13703
Diagnostic(ErrorCode.
ERR_EscapeCall
, "heapLocal += stackLocal").WithArguments("S4.operator +(scoped in S4, scoped in S4)", "b").WithLocation(68, 9),
13779
Diagnostic(ErrorCode.
ERR_EscapeCall
, "+s").WithArguments("S.operator +(in S)", "s").WithLocation(6, 13),
13785
Diagnostic(ErrorCode.
ERR_EscapeCall
, "+new S()").WithArguments("S.operator +(in S)", "s").WithLocation(12, 16),
13791
Diagnostic(ErrorCode.
ERR_EscapeCall
, "+x").WithArguments("S.operator +(in S)", "s").WithLocation(18, 13),
13797
Diagnostic(ErrorCode.
ERR_EscapeCall
, "+x").WithArguments("S.operator +(in S)", "s").WithLocation(29, 16),
14007
Diagnostic(ErrorCode.
ERR_EscapeCall
, "s1 && s2").WithArguments("S.operator &(in S, in S)", "x").WithLocation(11, 16),
14044
Diagnostic(ErrorCode.
ERR_EscapeCall
, "new R(1) || new R(2)").WithArguments("R.operator |(scoped R, R)", "y").WithLocation(13, 16),
14047
Diagnostic(ErrorCode.
ERR_EscapeCall
, "new R(2)").WithArguments("R.R(in int)", "i").WithLocation(13, 28),
14053
Diagnostic(ErrorCode.
ERR_EscapeCall
, "new R(1) | new R(2)").WithArguments("R.operator |(scoped R, R)", "y").WithLocation(18, 16),
14056
Diagnostic(ErrorCode.
ERR_EscapeCall
, "new R(2)").WithArguments("R.R(in int)", "i").WithLocation(18, 27),
14090
Diagnostic(ErrorCode.
ERR_EscapeCall
, "new R(1)").WithArguments("R.R(in int)", "i").WithLocation(13, 16),
14093
Diagnostic(ErrorCode.
ERR_EscapeCall
, "new R(1) || new R(2)").WithArguments("R.operator |(R, scoped R)", "x").WithLocation(13, 16),
14099
Diagnostic(ErrorCode.
ERR_EscapeCall
, "new R(1)").WithArguments("R.R(in int)", "i").WithLocation(18, 16),
14102
Diagnostic(ErrorCode.
ERR_EscapeCall
, "new R(1) | new R(2)").WithArguments("R.operator |(R, scoped R)", "x").WithLocation(18, 16),
14164
Diagnostic(ErrorCode.
ERR_EscapeCall
, "new R(1)").WithArguments("R.R(in int)", "i").WithLocation(13, 16),
14167
Diagnostic(ErrorCode.
ERR_EscapeCall
, "new R(1) || new R(2)").WithArguments("R.operator |(R, R)", "x").WithLocation(13, 16),
14173
Diagnostic(ErrorCode.
ERR_EscapeCall
, "new R(1)").WithArguments("R.R(in int)", "i").WithLocation(18, 16),
14176
Diagnostic(ErrorCode.
ERR_EscapeCall
, "new R(1) | new R(2)").WithArguments("R.operator |(R, R)", "x").WithLocation(18, 16),
15333
Diagnostic(ErrorCode.
ERR_EscapeCall
, "X(c2)").WithArguments("C.X(C)", "c").WithLocation(9, 16));
15383
Diagnostic(ErrorCode.
ERR_EscapeCall
, "X(ref c2)").WithArguments("C.X(ref C)", "c").WithLocation(9, 20));
Semantics\RefFieldTests.cs (186)
3079
Diagnostic(ErrorCode.
ERR_EscapeCall
, "s.F1(ref t)").WithArguments("S.F1<T>(ref T)", "t").WithLocation(11, 70),
3085
Diagnostic(ErrorCode.
ERR_EscapeCall
, "s.F2(in t)").WithArguments("S.F2<T>(in T)", "t").WithLocation(12, 70),
3091
Diagnostic(ErrorCode.
ERR_EscapeCall
, "s.F2(t)").WithArguments("S.F2<T>(in T)", "t").WithLocation(13, 70),
3097
Diagnostic(ErrorCode.
ERR_EscapeCall
, "s.F3(out t)").WithArguments("S.F3<T>(out T)", "t").WithLocation(14, 70),
3103
Diagnostic(ErrorCode.
ERR_EscapeCall
, "s.F1(ref t)").WithArguments("S.F1<T>(ref T)", "t").WithLocation(29, 61),
3109
Diagnostic(ErrorCode.
ERR_EscapeCall
, "s.F2(in t)").WithArguments("S.F2<T>(in T)", "t").WithLocation(30, 75),
3119
Diagnostic(ErrorCode.
ERR_EscapeCall
, "s.F1(ref t)").WithArguments("S.F1<T>(ref T)", "t").WithLocation(11, 70),
3125
Diagnostic(ErrorCode.
ERR_EscapeCall
, "s.F2(in t)").WithArguments("S.F2<T>(in T)", "t").WithLocation(12, 70),
3131
Diagnostic(ErrorCode.
ERR_EscapeCall
, "s.F2(t)").WithArguments("S.F2<T>(in T)", "t").WithLocation(13, 70),
3137
Diagnostic(ErrorCode.
ERR_EscapeCall
, "s.F1(ref t)").WithArguments("S.F1<T>(ref T)", "t").WithLocation(24, 75),
3143
Diagnostic(ErrorCode.
ERR_EscapeCall
, "s.F2(in t)").WithArguments("S.F2<T>(in T)", "t").WithLocation(25, 75),
3149
Diagnostic(ErrorCode.
ERR_EscapeCall
, "s.F2(t)").WithArguments("S.F2<T>(in T)", "t").WithLocation(26, 75),
3155
Diagnostic(ErrorCode.
ERR_EscapeCall
, "s.F1(ref t)").WithArguments("S.F1<T>(ref T)", "t").WithLocation(29, 61),
3161
Diagnostic(ErrorCode.
ERR_EscapeCall
, "s.F2(in t)").WithArguments("S.F2<T>(in T)", "t").WithLocation(30, 75),
3209
Diagnostic(ErrorCode.
ERR_EscapeCall
, "F1(ref t)").WithArguments("C.F1<T>(ref T)", "t").WithLocation(9, 48),
3215
Diagnostic(ErrorCode.
ERR_EscapeCall
, "F2(in t)").WithArguments("C.F2<T>(in T)", "t").WithLocation(10, 48),
3221
Diagnostic(ErrorCode.
ERR_EscapeCall
, "F2(t)").WithArguments("C.F2<T>(in T)", "t").WithLocation(11, 48),
3227
Diagnostic(ErrorCode.
ERR_EscapeCall
, "F3(out t)").WithArguments("C.F3<T>(out T)", "t").WithLocation(12, 48),
3237
Diagnostic(ErrorCode.
ERR_EscapeCall
, "F1(ref t)").WithArguments("C.F1<T>(ref T)", "t").WithLocation(9, 48),
3243
Diagnostic(ErrorCode.
ERR_EscapeCall
, "F2(in t)").WithArguments("C.F2<T>(in T)", "t").WithLocation(10, 48),
3249
Diagnostic(ErrorCode.
ERR_EscapeCall
, "F2(t)").WithArguments("C.F2<T>(in T)", "t").WithLocation(11, 48),
3255
Diagnostic(ErrorCode.
ERR_EscapeCall
, "F1(ref t)").WithArguments("C.F1<T>(ref T)", "t").WithLocation(22, 53),
3261
Diagnostic(ErrorCode.
ERR_EscapeCall
, "F2(in t)").WithArguments("C.F2<T>(in T)", "t").WithLocation(23, 53),
3267
Diagnostic(ErrorCode.
ERR_EscapeCall
, "F2(t)").WithArguments("C.F2<T>(in T)", "t").WithLocation(24, 53),
3386
Diagnostic(ErrorCode.
ERR_EscapeCall
, "F1(t, ref u)").WithArguments("Program.F1<T, U>(T, ref U)", "u").WithLocation(23, 20),
3392
Diagnostic(ErrorCode.
ERR_EscapeCall
, "F2(t, in u)").WithArguments("Program.F2<T, U>(T, in U)", "u").WithLocation(29, 20),
3398
Diagnostic(ErrorCode.
ERR_EscapeCall
, "F2(t, u)").WithArguments("Program.F2<T, U>(T, in U)", "u").WithLocation(35, 20),
3404
Diagnostic(ErrorCode.
ERR_EscapeCall
, "F3(t, out u)").WithArguments("Program.F3<T, U>(T, out U)", "u").WithLocation(41, 20),
3410
Diagnostic(ErrorCode.
ERR_EscapeCall
, "F4(ref t, ref u)").WithArguments("Program.F4<T, U>(ref T, ref U)", "t").WithLocation(47, 20),
3416
Diagnostic(ErrorCode.
ERR_EscapeCall
, "F5(ref t, in u)").WithArguments("Program.F5<T, U>(ref T, in U)", "t").WithLocation(53, 20),
3422
Diagnostic(ErrorCode.
ERR_EscapeCall
, "F5(ref t, u)").WithArguments("Program.F5<T, U>(ref T, in U)", "t").WithLocation(59, 20),
3428
Diagnostic(ErrorCode.
ERR_EscapeCall
, "F6(ref t, out u)").WithArguments("Program.F6<T, U>(ref T, out U)", "t").WithLocation(65, 20),
3434
Diagnostic(ErrorCode.
ERR_EscapeCall
, "F7(in t, in u)").WithArguments("Program.F7<T, U>(in T, in U)", "t").WithLocation(71, 20),
3440
Diagnostic(ErrorCode.
ERR_EscapeCall
, "F7(t, u)").WithArguments("Program.F7<T, U>(in T, in U)", "t").WithLocation(77, 20),
3446
Diagnostic(ErrorCode.
ERR_EscapeCall
, "F8(in t, out u)").WithArguments("Program.F8<T, U>(in T, out U)", "t").WithLocation(83, 20),
3452
Diagnostic(ErrorCode.
ERR_EscapeCall
, "F8(t, out u)").WithArguments("Program.F8<T, U>(in T, out U)", "t").WithLocation(89, 20),
3458
Diagnostic(ErrorCode.
ERR_EscapeCall
, "F9(out t, out u)").WithArguments("Program.F9<T, U>(out T, out U)", "t").WithLocation(95, 20),
3468
Diagnostic(ErrorCode.
ERR_EscapeCall
, "F1(t, ref u)").WithArguments("Program.F1<T, U>(T, ref U)", "u").WithLocation(23, 20),
3474
Diagnostic(ErrorCode.
ERR_EscapeCall
, "F2(t, in u)").WithArguments("Program.F2<T, U>(T, in U)", "u").WithLocation(29, 20),
3480
Diagnostic(ErrorCode.
ERR_EscapeCall
, "F2(t, u)").WithArguments("Program.F2<T, U>(T, in U)", "u").WithLocation(35, 20),
3486
Diagnostic(ErrorCode.
ERR_EscapeCall
, "F4(ref t, ref u)").WithArguments("Program.F4<T, U>(ref T, ref U)", "t").WithLocation(47, 20),
3492
Diagnostic(ErrorCode.
ERR_EscapeCall
, "F5(ref t, in u)").WithArguments("Program.F5<T, U>(ref T, in U)", "t").WithLocation(53, 20),
3498
Diagnostic(ErrorCode.
ERR_EscapeCall
, "F5(ref t, u)").WithArguments("Program.F5<T, U>(ref T, in U)", "t").WithLocation(59, 20),
3504
Diagnostic(ErrorCode.
ERR_EscapeCall
, "F6(ref t, out u)").WithArguments("Program.F6<T, U>(ref T, out U)", "t").WithLocation(65, 20),
3510
Diagnostic(ErrorCode.
ERR_EscapeCall
, "F7(in t, in u)").WithArguments("Program.F7<T, U>(in T, in U)", "t").WithLocation(71, 20),
3516
Diagnostic(ErrorCode.
ERR_EscapeCall
, "F7(t, u)").WithArguments("Program.F7<T, U>(in T, in U)", "t").WithLocation(77, 20),
3522
Diagnostic(ErrorCode.
ERR_EscapeCall
, "F8(in t, out u)").WithArguments("Program.F8<T, U>(in T, out U)", "t").WithLocation(83, 20),
3528
Diagnostic(ErrorCode.
ERR_EscapeCall
, "F8(t, out u)").WithArguments("Program.F8<T, U>(in T, out U)", "t").WithLocation(89, 20),
3813
Diagnostic(ErrorCode.
ERR_EscapeCall
, "s.F1(ref t)").WithArguments("S.F1<T>(ref T)", "t").WithLocation(14, 65),
3819
Diagnostic(ErrorCode.
ERR_EscapeCall
, "s.F2(in t)").WithArguments("S.F2<T>(in T)", "t").WithLocation(15, 65),
3825
Diagnostic(ErrorCode.
ERR_EscapeCall
, "s.F2(t)").WithArguments("S.F2<T>(in T)", "t").WithLocation(16, 65),
3831
Diagnostic(ErrorCode.
ERR_EscapeCall
, "s.F1(ref t)").WithArguments("S.F1<T>(ref T)", "t").WithLocation(27, 70),
3837
Diagnostic(ErrorCode.
ERR_EscapeCall
, "s.F2(in t)").WithArguments("S.F2<T>(in T)", "t").WithLocation(28, 70),
3843
Diagnostic(ErrorCode.
ERR_EscapeCall
, "s.F2(t)").WithArguments("S.F2<T>(in T)", "t").WithLocation(29, 70),
3849
Diagnostic(ErrorCode.
ERR_EscapeCall
, "s.F1(ref t)").WithArguments("S.F1<T>(ref T)", "t").WithLocation(32, 56),
3855
Diagnostic(ErrorCode.
ERR_EscapeCall
, "s.F2(in t)").WithArguments("S.F2<T>(in T)", "t").WithLocation(33, 70),
3861
Diagnostic(ErrorCode.
ERR_EscapeCall
, "s.F2(t)").WithArguments("S.F2<T>(in T)", "t").WithLocation(34, 70),
3916
Diagnostic(ErrorCode.
ERR_EscapeCall
, "F1(ref t)").WithArguments("C.F1<T>(ref T)", "t").WithLocation(12, 40),
3922
Diagnostic(ErrorCode.
ERR_EscapeCall
, "F2(in t)").WithArguments("C.F2<T>(in T)", "t").WithLocation(13, 40),
3928
Diagnostic(ErrorCode.
ERR_EscapeCall
, "F2(t)").WithArguments("C.F2<T>(in T)", "t").WithLocation(14, 40),
3934
Diagnostic(ErrorCode.
ERR_EscapeCall
, "F1(ref t)").WithArguments("C.F1<T>(ref T)", "t").WithLocation(25, 45),
3940
Diagnostic(ErrorCode.
ERR_EscapeCall
, "F2(in t)").WithArguments("C.F2<T>(in T)", "t").WithLocation(26, 45),
3946
Diagnostic(ErrorCode.
ERR_EscapeCall
, "F2(t)").WithArguments("C.F2<T>(in T)", "t").WithLocation(27, 45),
4072
Diagnostic(ErrorCode.
ERR_EscapeCall
, "F1(t, ref u)").WithArguments("Program.F1<T, U>(T, ref U)", "u").WithLocation(26, 16),
4078
Diagnostic(ErrorCode.
ERR_EscapeCall
, "F2(t, in u)").WithArguments("Program.F2<T, U>(T, in U)", "u").WithLocation(32, 16),
4084
Diagnostic(ErrorCode.
ERR_EscapeCall
, "F2(t, u)").WithArguments("Program.F2<T, U>(T, in U)", "u").WithLocation(38, 16),
4090
Diagnostic(ErrorCode.
ERR_EscapeCall
, "F4(ref t, ref u)").WithArguments("Program.F4<T, U>(ref T, ref U)", "t").WithLocation(50, 16),
4096
Diagnostic(ErrorCode.
ERR_EscapeCall
, "F5(ref t, in u)").WithArguments("Program.F5<T, U>(ref T, in U)", "t").WithLocation(56, 16),
4102
Diagnostic(ErrorCode.
ERR_EscapeCall
, "F5(ref t, u)").WithArguments("Program.F5<T, U>(ref T, in U)", "t").WithLocation(62, 16),
4108
Diagnostic(ErrorCode.
ERR_EscapeCall
, "F6(ref t, out u)").WithArguments("Program.F6<T, U>(ref T, out U)", "t").WithLocation(68, 16),
4114
Diagnostic(ErrorCode.
ERR_EscapeCall
, "F7(in t, in u)").WithArguments("Program.F7<T, U>(in T, in U)", "t").WithLocation(74, 16),
4120
Diagnostic(ErrorCode.
ERR_EscapeCall
, "F7(t, u)").WithArguments("Program.F7<T, U>(in T, in U)", "t").WithLocation(80, 16),
4126
Diagnostic(ErrorCode.
ERR_EscapeCall
, "F8(in t, out u)").WithArguments("Program.F8<T, U>(in T, out U)", "t").WithLocation(86, 16),
4132
Diagnostic(ErrorCode.
ERR_EscapeCall
, "F8(t, out u)").WithArguments("Program.F8<T, U>(in T, out U)", "t").WithLocation(92, 16),
4171
Diagnostic(ErrorCode.
ERR_EscapeCall
, "F0(ref x, ref y)").WithArguments("Program.F0<T>(ref R<T>, ref R<T>)", "y").WithLocation(9, 68),
4177
Diagnostic(ErrorCode.
ERR_EscapeCall
, "F0(ref x, ref y)").WithArguments("Program.F0<T>(ref R<T>, ref R<T>)", "x").WithLocation(13, 75),
4183
Diagnostic(ErrorCode.
ERR_EscapeCall
, "F2(ref x, ref y)").WithArguments("Program.F2<T>(ref R<T>, scoped ref R<T>)", "x").WithLocation(14, 75),
4215
Diagnostic(ErrorCode.
ERR_EscapeCall
, "F0(x, y)").WithArguments("Program.F0(R, R)", "y").WithLocation(11, 61),
4221
Diagnostic(ErrorCode.
ERR_EscapeCall
, "F0(x, y)").WithArguments("Program.F0(R, R)", "x").WithLocation(15, 68),
4227
Diagnostic(ErrorCode.
ERR_EscapeCall
, "F1(x, y)").WithArguments("Program.F1(R, scoped R)", "x").WithLocation(16, 68),
4264
Diagnostic(ErrorCode.
ERR_EscapeCall
, "M1(r)").WithArguments("Program.M1(R, params object[])", "input").WithLocation(15, 16),
4270
Diagnostic(ErrorCode.
ERR_EscapeCall
, "M1(r, 0, 1, 2)").WithArguments("Program.M1(R, params object[])", "input").WithLocation(21, 16),
5133
Diagnostic(ErrorCode.
ERR_EscapeCall
, "new R<int>(ref i)").WithArguments("R<int>.R(ref int)", "t").WithLocation(12, 16),
5210
Diagnostic(ErrorCode.
ERR_EscapeCall
, "F(in i1)").WithArguments("Program.F<int>(in int)", "t").WithLocation(10, 20),
5216
Diagnostic(ErrorCode.
ERR_EscapeCall
, "F(i2)").WithArguments("Program.F<int>(in int)", "t").WithLocation(15, 20),
5222
Diagnostic(ErrorCode.
ERR_EscapeCall
, "F(3)").WithArguments("Program.F<int>(in int)", "t").WithLocation(19, 20),
5261
Diagnostic(ErrorCode.
ERR_EscapeCall
, "F(in x1, in y1)").WithArguments("Program.F<int>(in int, scoped in int)", "x").WithLocation(11, 20),
5267
Diagnostic(ErrorCode.
ERR_EscapeCall
, "F(x2, in y2)").WithArguments("Program.F<int>(in int, scoped in int)", "x").WithLocation(17, 20),
5273
Diagnostic(ErrorCode.
ERR_EscapeCall
, "F(3, in y3)").WithArguments("Program.F<int>(in int, scoped in int)", "x").WithLocation(22, 20),
5409
Diagnostic(ErrorCode.
ERR_EscapeCall
, "new S<T>(ref t0)").WithArguments("S<T>.S(ref T)", "t").WithLocation(12, 16),
5415
Diagnostic(ErrorCode.
ERR_EscapeCall
, "new S<T>(ref t1)").WithArguments("S<T>.S(ref T)", "t").WithLocation(19, 16),
5421
Diagnostic(ErrorCode.
ERR_EscapeCall
, "new S<T>(ref t2)").WithArguments("S<T>.S(ref T)", "t").WithLocation(27, 14),
5427
Diagnostic(ErrorCode.
ERR_EscapeCall
, "new S<T>(ref t4)").WithArguments("S<T>.S(ref T)", "t").WithLocation(40, 13),
10845
Diagnostic(ErrorCode.
ERR_EscapeCall
, "MayCaptureArg(ref i)").WithArguments("A.MayCaptureArg(ref int)", "i").WithLocation(6, 16),
10854
Diagnostic(ErrorCode.
ERR_EscapeCall
, "MayCaptureDefaultArg()").WithArguments("A.MayCaptureDefaultArg(in int)", "i").WithLocation(10, 16));
10904
Diagnostic(ErrorCode.
ERR_EscapeCall
, "new R1(ref o)").WithArguments("R1.R1(ref object)", "o").WithLocation(6, 16),
10910
Diagnostic(ErrorCode.
ERR_EscapeCall
, "new R2(new object())").WithArguments("R2.R2(in object)", "o").WithLocation(10, 16),
17918
Diagnostic(ErrorCode.
ERR_EscapeCall
, "d2(new R(ref i))").WithArguments("D2.Invoke(R)", "x").WithLocation(18, 16),
17921
Diagnostic(ErrorCode.
ERR_EscapeCall
, "new R(ref i)").WithArguments("R.R(ref int)", "i").WithLocation(18, 19),
18041
Diagnostic(ErrorCode.
ERR_EscapeCall
, "f(y1, x1)").WithArguments("<anonymous delegate>.Invoke(R, scoped R)", "arg1").WithLocation(9, 13),
19068
Diagnostic(ErrorCode.
ERR_EscapeCall
, "new R<T>(ref t)").WithArguments("R<T>.R(ref T)", "t").WithLocation(16, 14),
19126
Diagnostic(ErrorCode.
ERR_EscapeCall
, "new R<T>(ref t)").WithArguments("R<T>.R(ref T)", "t").WithLocation(9, 63),
19132
Diagnostic(ErrorCode.
ERR_EscapeCall
, "new R<T>(ref t)").WithArguments("R<T>.R(ref T)", "t").WithLocation(10, 42),
19138
Diagnostic(ErrorCode.
ERR_EscapeCall
, "new R<T>(ref t)").WithArguments("R<T>.R(ref T)", "t").WithLocation(11, 70),
19235
Diagnostic(ErrorCode.
ERR_EscapeCall
, "F0(new R<T>(ref t))").WithArguments("Program.F0<T>(R<T>)", "r0").WithLocation(19, 20),
19238
Diagnostic(ErrorCode.
ERR_EscapeCall
, "new R<T>(ref t)").WithArguments("R<T>.R(ref T)", "t").WithLocation(19, 23),
19279
Diagnostic(ErrorCode.
ERR_EscapeCall
, "this[x2, new R(ref i2)]").WithArguments("C.this[R, R]", "y").WithLocation(16, 16),
19282
Diagnostic(ErrorCode.
ERR_EscapeCall
, "new R(ref i2)").WithArguments("R.R(ref int)", "i").WithLocation(16, 25),
19288
Diagnostic(ErrorCode.
ERR_EscapeCall
, "c[new R(ref i4), y4]").WithArguments("C.this[R, R]", "x").WithLocation(25, 16),
19291
Diagnostic(ErrorCode.
ERR_EscapeCall
, "new R(ref i4)").WithArguments("R.R(ref int)", "i").WithLocation(25, 18),
19332
Diagnostic(ErrorCode.
ERR_EscapeCall
, "this[x2, y2]").WithArguments("C.this[in int, in int]", "y").WithLocation(16, 16),
19338
Diagnostic(ErrorCode.
ERR_EscapeCall
, "c[x4, y4]").WithArguments("C.this[in int, in int]", "x").WithLocation(25, 16),
19379
Diagnostic(ErrorCode.
ERR_EscapeCall
, "this[x2, new R(ref i2)]").WithArguments("C.this[R, R]", "y").WithLocation(16, 20),
19382
Diagnostic(ErrorCode.
ERR_EscapeCall
, "new R(ref i2)").WithArguments("R.R(ref int)", "i").WithLocation(16, 29),
19388
Diagnostic(ErrorCode.
ERR_EscapeCall
, "c[new R(ref i4), y4]").WithArguments("C.this[R, R]", "x").WithLocation(25, 20),
19391
Diagnostic(ErrorCode.
ERR_EscapeCall
, "new R(ref i4)").WithArguments("R.R(ref int)", "i").WithLocation(25, 22),
19427
Diagnostic(ErrorCode.
ERR_EscapeCall
, "this[x2, y2]").WithArguments("C.this[in int, in int]", "y").WithLocation(11, 20),
19433
Diagnostic(ErrorCode.
ERR_EscapeCall
, "c[x4, y4]").WithArguments("C.this[in int, in int]", "x").WithLocation(20, 20),
19899
Diagnostic(ErrorCode.
ERR_EscapeCall
, "new R<T>(ref t1)").WithArguments("R<T>.R(ref T)", "t").WithLocation(11, 16),
19908
Diagnostic(ErrorCode.
ERR_EscapeCall
, "Create(ref t3)").WithArguments("R<T>.Create(ref T)", "t").WithLocation(24, 16),
19955
Diagnostic(ErrorCode.
ERR_EscapeCall
, "new R<T>(ref t1)").WithArguments("R<T>.R(ref T)", "t").WithLocation(10, 16),
19964
Diagnostic(ErrorCode.
ERR_EscapeCall
, "Create(ref t3)").WithArguments("R<T>.Create(ref T)", "t").WithLocation(21, 16),
19997
Diagnostic(ErrorCode.
ERR_EscapeCall
, "new R<T>(ref t2)").WithArguments("R<T>.R(ref T)", "t").WithLocation(13, 16),
20268
Diagnostic(ErrorCode.
ERR_EscapeCall
, "c[r1]").WithArguments("C.this[R<int>]", "r").WithLocation(12, 16),
20306
Diagnostic(ErrorCode.
ERR_EscapeCall
, "c[i1]").WithArguments("C.this[in int]", "i").WithLocation(10, 16),
20312
Diagnostic(ErrorCode.
ERR_EscapeCall
, "c[2]").WithArguments("C.this[in int]", "i").WithLocation(14, 16),
21784
Diagnostic(ErrorCode.
ERR_EscapeCall
, "new R(ref x)").WithArguments("R.R(ref int)", "i").WithLocation(20, 17),
21790
Diagnostic(ErrorCode.
ERR_EscapeCall
, "new R(ref x)").WithArguments("R.R(ref int)", "i").WithLocation(29, 17),
21796
Diagnostic(ErrorCode.
ERR_EscapeCall
, "new R(ref x)").WithArguments("R.R(ref int)", "i").WithLocation(36, 13),
22905
Diagnostic(ErrorCode.
ERR_EscapeCall
, "C.M(ref x)").WithArguments("C.M(ref int)", "x").WithLocation(4, 9),
23034
Diagnostic(ErrorCode.
ERR_EscapeCall
, "new R(ref this)").WithArguments("R.R(ref S1)", "s1").WithLocation(11, 14),
23040
Diagnostic(ErrorCode.
ERR_EscapeCall
, "new R(ref this)").WithArguments("R.R(ref S1)", "s1").WithLocation(15, 14),
23046
Diagnostic(ErrorCode.
ERR_EscapeCall
, "new R(in this)").WithArguments("R.R(in S2)", "s2").WithLocation(22, 14),
23052
Diagnostic(ErrorCode.
ERR_EscapeCall
, "new R(in this)").WithArguments("R.R(in S2)", "s2").WithLocation(26, 14),
23694
Diagnostic(ErrorCode.
ERR_EscapeCall
, "F1A(ref r)").WithArguments("A<int>.F1A(ref R<int>)", "r1").WithLocation(7, 20),
23700
Diagnostic(ErrorCode.
ERR_EscapeCall
, "F2A(ref r)").WithArguments("A<int>.F2A(scoped ref R<int>)", "r2").WithLocation(13, 20),
23741
Diagnostic(ErrorCode.
ERR_EscapeCall
, "F1A(ref r)").WithArguments("A<int>.F1A(ref R<int>)", "r1").WithLocation(6, 20),
23984
Diagnostic(ErrorCode.
ERR_EscapeCall
, "F3A(out i)").WithArguments("A<int>.F3A(out int)", "t3").WithLocation(16, 20),
24037
Diagnostic(ErrorCode.
ERR_EscapeCall
, "F1A(ref i)").WithArguments("A<int>.F1A(ref int)", "t1").WithLocation(14, 20),
24043
Diagnostic(ErrorCode.
ERR_EscapeCall
, "F3A(ref i)").WithArguments("A<int>.F3A(ref int)", "t3").WithLocation(24, 20),
24049
Diagnostic(ErrorCode.
ERR_EscapeCall
, "F4A(ref i)").WithArguments("A<int>.F4A(ref int)", "t4").WithLocation(29, 20),
24103
Diagnostic(ErrorCode.
ERR_EscapeCall
, "F1A(in i)").WithArguments("A<int>.F1A(in int)", "t1").WithLocation(14, 20),
24109
Diagnostic(ErrorCode.
ERR_EscapeCall
, "F3A(in i)").WithArguments("A<int>.F3A(in int)", "t3").WithLocation(24, 20),
24115
Diagnostic(ErrorCode.
ERR_EscapeCall
, "F4A(in i)").WithArguments("A<int>.F4A(in int)", "t4").WithLocation(29, 20),
24193
Diagnostic(ErrorCode.
ERR_EscapeCall
, "F1A(r)").WithArguments("A<int>.F1A(R<int>)", "r1").WithLocation(32, 20),
24199
Diagnostic(ErrorCode.
ERR_EscapeCall
, "F3A(r)").WithArguments("A<int>.F3A(R<int>)", "r3").WithLocation(44, 20),
24205
Diagnostic(ErrorCode.
ERR_EscapeCall
, "F4A(r)").WithArguments("A<int>.F4A(R<int>)", "r4").WithLocation(50, 20),
24607
Diagnostic(ErrorCode.
ERR_EscapeCall
, "new R(in i1)").WithArguments("R.R(in int)", "i").WithLocation(7, 16),
24613
Diagnostic(ErrorCode.
ERR_EscapeCall
, "new R(in i2)").WithArguments("R.R(in int)", "i").WithLocation(11, 16),
24619
Diagnostic(ErrorCode.
ERR_EscapeCall
, "new R(in i3)").WithArguments("R.R(in int)", "i").WithLocation(16, 16),
24625
Diagnostic(ErrorCode.
ERR_EscapeCall
, "new R(in i6)").WithArguments("R.R(in int)", "i").WithLocation(29, 16),
24782
Diagnostic(ErrorCode.
ERR_EscapeCall
, "UnscopedOut(out i6)").WithArguments("A<int>.UnscopedOut(out int)", "t6").WithLocation(31, 20),
24852
Diagnostic(ErrorCode.
ERR_EscapeCall
, "F1(out i3)").WithArguments("Program.F1(out int)", "i1").WithLocation(17, 20),
24976
Diagnostic(ErrorCode.
ERR_EscapeCall
, "A.UnscopedRefOnly(out i)").WithArguments("A.UnscopedRefOnly(out int)", "i").WithLocation(16, 20),
27146
Diagnostic(ErrorCode.
ERR_EscapeCall
, "F1(out T t)").WithArguments("Program.F1<T>(out T)", "t").WithLocation(4, 33),
28609
Diagnostic(ErrorCode.
ERR_EscapeCall
, "Inner1(ref p1)").WithArguments("Inner1(ref S)", "s").WithLocation(31, 10),
28615
Diagnostic(ErrorCode.
ERR_EscapeCall
, "Inner1(ref p1)").WithArguments("Inner1(ref S)", "s").WithLocation(41, 10),
28621
Diagnostic(ErrorCode.
ERR_EscapeCall
, "Inner1(ref p)").WithArguments("Inner1(ref S)", "s").WithLocation(46, 29),
28793
Diagnostic(ErrorCode.
ERR_EscapeCall
, "Inner1(ref this)").WithArguments("S.Inner1(ref S)", "s").WithLocation(31, 13),
28799
Diagnostic(ErrorCode.
ERR_EscapeCall
, "Inner1(ref this)").WithArguments("S.Inner1(ref S)", "s").WithLocation(36, 13),
28959
Diagnostic(ErrorCode.
ERR_EscapeCall
, "new RS(ref i)").WithArguments("RS.RS(ref int)", "i").WithLocation(13, 16),
28988
Diagnostic(ErrorCode.
ERR_EscapeCall
, "new RS(ref i)").WithArguments("RS.RS(ref int)", "i").WithLocation(9, 50),
29017
Diagnostic(ErrorCode.
ERR_EscapeCall
, "new RS(in i)").WithArguments("RS.RS(in int)", "i").WithLocation(9, 49),
29049
Diagnostic(ErrorCode.
ERR_EscapeCall
, "new RS(ref i.field)").WithArguments("RS.RS(ref int)", "i").WithLocation(11, 49),
29658
Diagnostic(ErrorCode.
ERR_EscapeCall
, "new(ref i1)").WithArguments("RS.RS(ref int)", "i0").WithLocation(3, 40),
29664
Diagnostic(ErrorCode.
ERR_EscapeCall
, "new(ref i2)").WithArguments("RS.RS(ref int)", "i0").WithLocation(6, 16),
29670
Diagnostic(ErrorCode.
ERR_EscapeCall
, "new RS(ref i3)").WithArguments("RS.RS(ref int)", "i0").WithLocation(9, 40),
29676
Diagnostic(ErrorCode.
ERR_EscapeCall
, "new RS(ref i4)").WithArguments("RS.RS(ref int)", "i0").WithLocation(12, 16),
29715
Diagnostic(ErrorCode.
ERR_EscapeCall
, "new(ref i1)").WithArguments("RS.RS(ref int)", "i0").WithLocation(5, 43),
29721
Diagnostic(ErrorCode.
ERR_EscapeCall
, "new(ref i2)").WithArguments("RS.RS(ref int)", "i0").WithLocation(8, 20),
29727
Diagnostic(ErrorCode.
ERR_EscapeCall
, "new RS(ref i3)").WithArguments("RS.RS(ref int)", "i0").WithLocation(11, 43),
29733
Diagnostic(ErrorCode.
ERR_EscapeCall
, "new RS(ref i4)").WithArguments("RS.RS(ref int)", "i0").WithLocation(14, 20),
29924
Diagnostic(ErrorCode.
ERR_EscapeCall
, "new RefStruct(ref value)").WithArguments("Repro.RefStruct.RefStruct(ref int)", "i").WithLocation(7, 14),
29930
Diagnostic(ErrorCode.
ERR_EscapeCall
, "new RefStruct(ref value)").WithArguments("Repro.RefStruct.RefStruct(ref int)", "i").WithLocation(12, 26),
29936
Diagnostic(ErrorCode.
ERR_EscapeCall
, "new RefStruct(ref value)").WithArguments("Repro.RefStruct.RefStruct(ref int)", "i").WithLocation(17, 26),
29942
Diagnostic(ErrorCode.
ERR_EscapeCall
, "new RefStruct(ref value)").WithArguments("Repro.RefStruct.RefStruct(ref int)", "i").WithLocation(22, 26),
30019
Diagnostic(ErrorCode.
ERR_EscapeCall
, "M1(ref s1, ref s2)").WithArguments("Repro.M1(ref Repro.RefStruct, ref Repro.RefStruct)", "s2").WithLocation(14, 20),
30470
Diagnostic(ErrorCode.
ERR_EscapeCall
, "new Span<int>(ref x)").WithArguments("System.Span<int>.Span(ref int)", "reference").WithLocation(6, 59),
30520
Diagnostic(ErrorCode.
ERR_EscapeCall
, "new R(in i)").WithArguments("R.R(in int)", "i").WithLocation(9, 16),
30526
Diagnostic(ErrorCode.
ERR_EscapeCall
, "new R(in i)").WithArguments("R.R(in int)", "i").WithLocation(15, 13),
30554
Diagnostic(ErrorCode.
ERR_EscapeCall
, "new R(1)").WithArguments("R.R(in int)", "i").WithLocation(8, 16),
30560
Diagnostic(ErrorCode.
ERR_EscapeCall
, "new R(1)").WithArguments("R.R(in int)", "i").WithLocation(12, 16),
30866
Diagnostic(ErrorCode.
ERR_EscapeCall
, "F2(out _)").WithArguments("Program.F2(out int)", "i").WithLocation(5, 20),
30894
Diagnostic(ErrorCode.
ERR_EscapeCall
, "F2(out _)").WithArguments("Program.F2(out int)", "i").WithLocation(6, 20),
30984
Diagnostic(ErrorCode.
ERR_EscapeCall
, "F(x, y switch { Span<int> inner => inner })").WithArguments("Program.F(System.Span<int>, System.Span<int>)", "y").WithLocation(12, 13),
31092
Diagnostic(ErrorCode.
ERR_EscapeCall
, "F0(ref x1, ref y1)").WithArguments("Program.F0(ref int, ref int)", "y").WithLocation(12, 24),
Semantics\RefLocalsAndReturnsTests.cs (4)
2278
Diagnostic(ErrorCode.
ERR_EscapeCall
, "Goo(ref M1)").WithArguments("Test.Goo<char>(ref char)", "arg").WithLocation(36, 24),
2284
Diagnostic(ErrorCode.
ERR_EscapeCall
, "Goo(ref M2.x)").WithArguments("Test.Goo<char>(ref char)", "arg").WithLocation(41, 24),
4141
Diagnostic(ErrorCode.
ERR_EscapeCall
, "d(ref i, ref j, o)").WithArguments("D.Invoke(ref int, ref int, object)", "i").WithLocation(8, 20)
4165
Diagnostic(ErrorCode.
ERR_EscapeCall
, "M(ref j)").WithArguments("Program.M(ref int)", "i").WithLocation(7, 20)
Semantics\Utf8StringsLiteralsTests.cs (1)
3793
Diagnostic(ErrorCode.
ERR_EscapeCall
, @"Test3(""cat""u8)").WithArguments("C.Test3(in System.ReadOnlySpan<byte>)", "x").WithLocation(7, 20),
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (1)
Symbols\PartialPropertiesTests.cs (1)
3334
Diagnostic(ErrorCode.
ERR_EscapeCall
, "this[rs]").WithArguments("C2.this[RS]", "rs").WithLocation(18, 16),