76 references to ERR_RefReturnNonreturnableLocal
Microsoft.CodeAnalysis.CSharp (2)
Binder\Binder.ValueChecks.cs (1)
1123
Error(diagnostics, inUnsafeRegion ? ErrorCode.WRN_RefReturnNonreturnableLocal : ErrorCode.
ERR_RefReturnNonreturnableLocal
, node, localSymbol);
Errors\ErrorFacts.cs (1)
1781
or ErrorCode.
ERR_RefReturnNonreturnableLocal
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (1)
CodeGen\CodeGenRefConditionalOperatorTests.cs (1)
805
Diagnostic(ErrorCode.
ERR_RefReturnNonreturnableLocal
, "temp").WithArguments("temp").WithLocation(15, 20)
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (28)
RefStructInterfacesTests.cs (16)
3520
Diagnostic(ErrorCode.
ERR_RefReturnNonreturnableLocal
, "i3").WithArguments("i3").WithLocation(24, 20),
3523
Diagnostic(ErrorCode.
ERR_RefReturnNonreturnableLocal
, "i4").WithArguments("i4").WithLocation(30, 20));
3810
Diagnostic(ErrorCode.
ERR_RefReturnNonreturnableLocal
, "xyzw1").WithArguments("xyzw1").WithLocation(22, 20),
3813
Diagnostic(ErrorCode.
ERR_RefReturnNonreturnableLocal
, "xyzw2").WithArguments("xyzw2").WithLocation(29, 20),
3816
Diagnostic(ErrorCode.
ERR_RefReturnNonreturnableLocal
, "xyzw3").WithArguments("xyzw3").WithLocation(35, 20),
3819
Diagnostic(ErrorCode.
ERR_RefReturnNonreturnableLocal
, "xyzw4").WithArguments("xyzw4").WithLocation(42, 20)
3986
Diagnostic(ErrorCode.
ERR_RefReturnNonreturnableLocal
, "r1").WithArguments("r1").WithLocation(8, 20),
3989
Diagnostic(ErrorCode.
ERR_RefReturnNonreturnableLocal
, "r2").WithArguments("r2").WithLocation(15, 20),
3992
Diagnostic(ErrorCode.
ERR_RefReturnNonreturnableLocal
, "r3").WithArguments("r3").WithLocation(21, 20),
3995
Diagnostic(ErrorCode.
ERR_RefReturnNonreturnableLocal
, "r4").WithArguments("r4").WithLocation(28, 20)
26416
Diagnostic(ErrorCode.
ERR_RefReturnNonreturnableLocal
, "l0").WithArguments("l0").WithLocation(7, 20),
26422
Diagnostic(ErrorCode.
ERR_RefReturnNonreturnableLocal
, "l1").WithArguments("l1").WithLocation(12, 20),
26425
Diagnostic(ErrorCode.
ERR_RefReturnNonreturnableLocal
, "l2").WithArguments("l2").WithLocation(17, 20),
26428
Diagnostic(ErrorCode.
ERR_RefReturnNonreturnableLocal
, "l3").WithArguments("l3").WithLocation(22, 20)
26489
Diagnostic(ErrorCode.
ERR_RefReturnNonreturnableLocal
, "y2").WithArguments("y2").WithLocation(13, 20)
26517
Diagnostic(ErrorCode.
ERR_RefReturnNonreturnableLocal
, "y2").WithArguments("y2").WithLocation(13, 20)
Semantics\ExtensionTests.cs (4)
39041
Diagnostic(ErrorCode.
ERR_RefReturnNonreturnableLocal
, "ri").WithArguments("ri").WithLocation(7, 20),
39050
Diagnostic(ErrorCode.
ERR_RefReturnNonreturnableLocal
, "ri").WithArguments("ri").WithLocation(14, 28));
39514
Diagnostic(ErrorCode.
ERR_RefReturnNonreturnableLocal
, "ri").WithArguments("ri").WithLocation(7, 20),
39523
Diagnostic(ErrorCode.
ERR_RefReturnNonreturnableLocal
, "ri").WithArguments("ri").WithLocation(14, 32));
Semantics\InlineArrayTests.cs (8)
2640
Diagnostic(ErrorCode.
ERR_RefReturnNonreturnableLocal
, "y").WithArguments("y").WithLocation(21, 20)
2678
Diagnostic(ErrorCode.
ERR_RefReturnNonreturnableLocal
, "y").WithArguments("y").WithLocation(11, 20)
2952
Diagnostic(ErrorCode.
ERR_RefReturnNonreturnableLocal
, "y").WithArguments("y").WithLocation(21, 20)
2990
Diagnostic(ErrorCode.
ERR_RefReturnNonreturnableLocal
, "y").WithArguments("y").WithLocation(11, 20)
9525
Diagnostic(ErrorCode.
ERR_RefReturnNonreturnableLocal
, "x").WithArguments("x").WithLocation(24, 20)
9789
Diagnostic(ErrorCode.
ERR_RefReturnNonreturnableLocal
, "x").WithArguments("x").WithLocation(16, 20)
18777
Diagnostic(ErrorCode.
ERR_RefReturnNonreturnableLocal
, "y").WithArguments("y").WithLocation(8, 24)
19068
Diagnostic(ErrorCode.
ERR_RefReturnNonreturnableLocal
, "yy").WithArguments("yy").WithLocation(20, 24)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (45)
Semantics\ArglistTests.cs (1)
299
Diagnostic(ErrorCode.
ERR_RefReturnNonreturnableLocal
, "r").WithArguments("r").WithLocation(13, 20),
Semantics\NullableReferenceTypesTests.cs (2)
1289
Diagnostic(ErrorCode.
ERR_RefReturnNonreturnableLocal
, "y").WithArguments("y").WithLocation(10, 24),
1292
Diagnostic(ErrorCode.
ERR_RefReturnNonreturnableLocal
, "y").WithArguments("y").WithLocation(12, 20),
Semantics\RefEscapingTests.cs (11)
4557
Diagnostic(ErrorCode.
ERR_RefReturnNonreturnableLocal
, "ternary1").WithArguments("ternary1").WithLocation(25, 24),
7468
Diagnostic(ErrorCode.
ERR_RefReturnNonreturnableLocal
, "xyzw1").WithArguments("xyzw1").WithLocation(22, 20),
7471
Diagnostic(ErrorCode.
ERR_RefReturnNonreturnableLocal
, "xyzw2").WithArguments("xyzw2").WithLocation(29, 20),
7474
Diagnostic(ErrorCode.
ERR_RefReturnNonreturnableLocal
, "xyzw3").WithArguments("xyzw3").WithLocation(35, 20),
7477
Diagnostic(ErrorCode.
ERR_RefReturnNonreturnableLocal
, "xyzw4").WithArguments("xyzw4").WithLocation(42, 20)
7535
Diagnostic(ErrorCode.
ERR_RefReturnNonreturnableLocal
, "r1").WithArguments("r1").WithLocation(12, 16),
7538
Diagnostic(ErrorCode.
ERR_RefReturnNonreturnableLocal
, "r2").WithArguments("r2").WithLocation(19, 16),
7541
Diagnostic(ErrorCode.
ERR_RefReturnNonreturnableLocal
, "r3").WithArguments("r3").WithLocation(25, 16),
7544
Diagnostic(ErrorCode.
ERR_RefReturnNonreturnableLocal
, "r4").WithArguments("r4").WithLocation(32, 16)
7966
Diagnostic(ErrorCode.
ERR_RefReturnNonreturnableLocal
, "xyzw3").WithArguments("xyzw3").WithLocation(17, 20),
7969
Diagnostic(ErrorCode.
ERR_RefReturnNonreturnableLocal
, "xyzw4").WithArguments("xyzw4").WithLocation(25, 20)
Semantics\RefFieldTests.cs (16)
4487
Diagnostic(ErrorCode.
ERR_RefReturnNonreturnableLocal
, "r").WithArguments("r").WithLocation(10, 20));
5000
Diagnostic(ErrorCode.
ERR_RefReturnNonreturnableLocal
, "r").WithArguments("r").WithLocation(11, 20));
5064
Diagnostic(ErrorCode.
ERR_RefReturnNonreturnableLocal
, "i").WithArguments("i").WithLocation(12, 31));
9817
Diagnostic(ErrorCode.
ERR_RefReturnNonreturnableLocal
, "y2").WithArguments("y2").WithLocation(15, 20));
9830
Diagnostic(ErrorCode.
ERR_RefReturnNonreturnableLocal
, "y2").WithArguments("y2").WithLocation(15, 20));
18628
Diagnostic(ErrorCode.
ERR_RefReturnNonreturnableLocal
, "l0").WithArguments("l0").WithLocation(7, 20),
18631
Diagnostic(ErrorCode.
ERR_RefReturnNonreturnableLocal
, "l1").WithArguments("l1").WithLocation(12, 20),
18634
Diagnostic(ErrorCode.
ERR_RefReturnNonreturnableLocal
, "l3").WithArguments("l3").WithLocation(22, 20));
18699
Diagnostic(ErrorCode.
ERR_RefReturnNonreturnableLocal
, "l0").WithArguments("l0").WithLocation(7, 20),
18705
Diagnostic(ErrorCode.
ERR_RefReturnNonreturnableLocal
, "l1").WithArguments("l1").WithLocation(12, 20),
18708
Diagnostic(ErrorCode.
ERR_RefReturnNonreturnableLocal
, "l2").WithArguments("l2").WithLocation(17, 20),
18711
Diagnostic(ErrorCode.
ERR_RefReturnNonreturnableLocal
, "l3").WithArguments("l3").WithLocation(22, 20));
22977
Diagnostic(ErrorCode.
ERR_RefReturnNonreturnableLocal
, "s1").WithArguments("s1").WithLocation(7, 20));
23769
Diagnostic(ErrorCode.
ERR_RefReturnNonreturnableLocal
, "y").WithArguments("y").WithLocation(18, 20));
30516
Diagnostic(ErrorCode.
ERR_RefReturnNonreturnableLocal
, "i3").WithArguments("i3").WithLocation(24, 20),
30519
Diagnostic(ErrorCode.
ERR_RefReturnNonreturnableLocal
, "i4").WithArguments("i4").WithLocation(30, 20));
Semantics\RefLocalsAndReturnsTests.cs (15)
199
Diagnostic(ErrorCode.
ERR_RefReturnNonreturnableLocal
, "rx = ref (new int[1])[0]").WithArguments("rx").WithLocation(8, 21));
253
Diagnostic(ErrorCode.
ERR_RefReturnNonreturnableLocal
, "x").WithArguments("x").WithLocation(20, 28));
454
Diagnostic(ErrorCode.
ERR_RefReturnNonreturnableLocal
, "i").WithArguments("i").WithLocation(11, 28));
2377
Diagnostic(ErrorCode.
ERR_RefReturnNonreturnableLocal
, "r").WithArguments("r").WithLocation(18, 24),
2380
Diagnostic(ErrorCode.
ERR_RefReturnNonreturnableLocal
, "r").WithArguments("r").WithLocation(28, 24),
2386
Diagnostic(ErrorCode.
ERR_RefReturnNonreturnableLocal
, "r").WithArguments("r").WithLocation(47, 24),
2389
Diagnostic(ErrorCode.
ERR_RefReturnNonreturnableLocal
, "r").WithArguments("r").WithLocation(56, 24),
2627
Diagnostic(ErrorCode.
ERR_RefReturnNonreturnableLocal
, "r").WithArguments("r").WithLocation(19, 24),
2636
Diagnostic(ErrorCode.
ERR_RefReturnNonreturnableLocal
, "valid").WithArguments("valid").WithLocation(43, 24),
2639
Diagnostic(ErrorCode.
ERR_RefReturnNonreturnableLocal
, "r").WithArguments("r").WithLocation(52, 24),
3648
Diagnostic(ErrorCode.
ERR_RefReturnNonreturnableLocal
, "rl").WithArguments("rl").WithLocation(14, 20)
3717
Diagnostic(ErrorCode.
ERR_RefReturnNonreturnableLocal
, "rl").WithArguments("rl").WithLocation(8, 20)
4969
Diagnostic(ErrorCode.
ERR_RefReturnNonreturnableLocal
, "y").WithArguments("y").WithLocation(8, 20),
4972
Diagnostic(ErrorCode.
ERR_RefReturnNonreturnableLocal
, "y").WithArguments("y").WithLocation(16, 24));
5022
Diagnostic(ErrorCode.
ERR_RefReturnNonreturnableLocal
, "z").WithArguments("z").WithLocation(19, 18));