48 references to ERR_RefReturnNonreturnableLocal
Microsoft.CodeAnalysis.CSharp (2)
Binder\Binder.ValueChecks.cs (1)
899
Error(diagnostics, inUnsafeRegion ? ErrorCode.WRN_RefReturnNonreturnableLocal : ErrorCode.
ERR_RefReturnNonreturnableLocal
, node, localSymbol);
Errors\ErrorFacts.cs (1)
1719
case ErrorCode.
ERR_RefReturnNonreturnableLocal
:
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (1)
CodeGen\CodeGenRefConditionalOperatorTests.cs (1)
804
Diagnostic(ErrorCode.
ERR_RefReturnNonreturnableLocal
, "temp").WithArguments("temp").WithLocation(15, 20)
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)
1277
Diagnostic(ErrorCode.
ERR_RefReturnNonreturnableLocal
, "y").WithArguments("y").WithLocation(10, 24),
1280
Diagnostic(ErrorCode.
ERR_RefReturnNonreturnableLocal
, "y").WithArguments("y").WithLocation(12, 20),
Semantics\RefEscapingTests.cs (11)
3195
Diagnostic(ErrorCode.
ERR_RefReturnNonreturnableLocal
, "ternary1").WithArguments("ternary1").WithLocation(25, 24),
5488
Diagnostic(ErrorCode.
ERR_RefReturnNonreturnableLocal
, "xyzw1").WithArguments("xyzw1").WithLocation(22, 20),
5491
Diagnostic(ErrorCode.
ERR_RefReturnNonreturnableLocal
, "xyzw2").WithArguments("xyzw2").WithLocation(29, 20),
5494
Diagnostic(ErrorCode.
ERR_RefReturnNonreturnableLocal
, "xyzw3").WithArguments("xyzw3").WithLocation(35, 20),
5497
Diagnostic(ErrorCode.
ERR_RefReturnNonreturnableLocal
, "xyzw4").WithArguments("xyzw4").WithLocation(42, 20)
5555
Diagnostic(ErrorCode.
ERR_RefReturnNonreturnableLocal
, "r1").WithArguments("r1").WithLocation(12, 16),
5558
Diagnostic(ErrorCode.
ERR_RefReturnNonreturnableLocal
, "r2").WithArguments("r2").WithLocation(19, 16),
5561
Diagnostic(ErrorCode.
ERR_RefReturnNonreturnableLocal
, "r3").WithArguments("r3").WithLocation(25, 16),
5564
Diagnostic(ErrorCode.
ERR_RefReturnNonreturnableLocal
, "r4").WithArguments("r4").WithLocation(32, 16)
5986
Diagnostic(ErrorCode.
ERR_RefReturnNonreturnableLocal
, "xyzw3").WithArguments("xyzw3").WithLocation(17, 20),
5989
Diagnostic(ErrorCode.
ERR_RefReturnNonreturnableLocal
, "xyzw4").WithArguments("xyzw4").WithLocation(25, 20)
Semantics\RefFieldTests.cs (16)
4424
Diagnostic(ErrorCode.
ERR_RefReturnNonreturnableLocal
, "r").WithArguments("r").WithLocation(10, 20));
4937
Diagnostic(ErrorCode.
ERR_RefReturnNonreturnableLocal
, "r").WithArguments("r").WithLocation(11, 20));
5001
Diagnostic(ErrorCode.
ERR_RefReturnNonreturnableLocal
, "i").WithArguments("i").WithLocation(12, 31));
9314
Diagnostic(ErrorCode.
ERR_RefReturnNonreturnableLocal
, "y2").WithArguments("y2").WithLocation(15, 20));
9321
Diagnostic(ErrorCode.
ERR_RefReturnNonreturnableLocal
, "y2").WithArguments("y2").WithLocation(15, 20));
18016
Diagnostic(ErrorCode.
ERR_RefReturnNonreturnableLocal
, "l0").WithArguments("l0").WithLocation(7, 20),
18019
Diagnostic(ErrorCode.
ERR_RefReturnNonreturnableLocal
, "l1").WithArguments("l1").WithLocation(12, 20),
18022
Diagnostic(ErrorCode.
ERR_RefReturnNonreturnableLocal
, "l3").WithArguments("l3").WithLocation(22, 20));
18087
Diagnostic(ErrorCode.
ERR_RefReturnNonreturnableLocal
, "l0").WithArguments("l0").WithLocation(7, 20),
18093
Diagnostic(ErrorCode.
ERR_RefReturnNonreturnableLocal
, "l1").WithArguments("l1").WithLocation(12, 20),
18096
Diagnostic(ErrorCode.
ERR_RefReturnNonreturnableLocal
, "l2").WithArguments("l2").WithLocation(17, 20),
18099
Diagnostic(ErrorCode.
ERR_RefReturnNonreturnableLocal
, "l3").WithArguments("l3").WithLocation(22, 20));
21830
Diagnostic(ErrorCode.
ERR_RefReturnNonreturnableLocal
, "s1").WithArguments("s1").WithLocation(7, 20));
22622
Diagnostic(ErrorCode.
ERR_RefReturnNonreturnableLocal
, "y").WithArguments("y").WithLocation(18, 20));
29149
Diagnostic(ErrorCode.
ERR_RefReturnNonreturnableLocal
, "i3").WithArguments("i3").WithLocation(24, 20),
29152
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));
2276
Diagnostic(ErrorCode.
ERR_RefReturnNonreturnableLocal
, "r").WithArguments("r").WithLocation(18, 24),
2279
Diagnostic(ErrorCode.
ERR_RefReturnNonreturnableLocal
, "r").WithArguments("r").WithLocation(28, 24),
2285
Diagnostic(ErrorCode.
ERR_RefReturnNonreturnableLocal
, "r").WithArguments("r").WithLocation(47, 24),
2288
Diagnostic(ErrorCode.
ERR_RefReturnNonreturnableLocal
, "r").WithArguments("r").WithLocation(56, 24),
2526
Diagnostic(ErrorCode.
ERR_RefReturnNonreturnableLocal
, "r").WithArguments("r").WithLocation(19, 24),
2535
Diagnostic(ErrorCode.
ERR_RefReturnNonreturnableLocal
, "valid").WithArguments("valid").WithLocation(43, 24),
2538
Diagnostic(ErrorCode.
ERR_RefReturnNonreturnableLocal
, "r").WithArguments("r").WithLocation(52, 24),
3275
Diagnostic(ErrorCode.
ERR_RefReturnNonreturnableLocal
, "rl").WithArguments("rl").WithLocation(14, 20)
3344
Diagnostic(ErrorCode.
ERR_RefReturnNonreturnableLocal
, "rl").WithArguments("rl").WithLocation(8, 20)
4574
Diagnostic(ErrorCode.
ERR_RefReturnNonreturnableLocal
, "y").WithArguments("y").WithLocation(8, 20),
4577
Diagnostic(ErrorCode.
ERR_RefReturnNonreturnableLocal
, "y").WithArguments("y").WithLocation(16, 24));
4627
Diagnostic(ErrorCode.
ERR_RefReturnNonreturnableLocal
, "z").WithArguments("z").WithLocation(19, 18));