34 references to ERR_RefReturnStructThis
Microsoft.CodeAnalysis.CSharp (2)
Binder\Binder.ValueChecks.cs (1)
1090Error(diagnostics, inUnsafeRegion ? ErrorCode.WRN_RefReturnStructThis : ErrorCode.ERR_RefReturnStructThis, node);
Errors\ErrorFacts.cs (1)
1730case ErrorCode.ERR_RefReturnStructThis:
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (2)
CodeGen\CodeGenRefReadonlyReturnTests.cs (2)
1078Diagnostic(ErrorCode.ERR_RefReturnStructThis, "this").WithLocation(8, 20), 1081Diagnostic(ErrorCode.ERR_RefReturnStructThis, "x").WithLocation(11, 44)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (30)
Semantics\RefEscapingTests.cs (1)
3543Diagnostic(ErrorCode.ERR_RefReturnStructThis, "x").WithLocation(31, 28)
Semantics\RefFieldTests.cs (23)
2820Diagnostic(ErrorCode.ERR_RefReturnStructThis, "this").WithLocation(3, 25), 2823Diagnostic(ErrorCode.ERR_RefReturnStructThis, "this").WithLocation(7, 25) 9618Diagnostic(ErrorCode.ERR_RefReturnStructThis, "t").WithLocation(5, 31)); 18117Diagnostic(ErrorCode.ERR_RefReturnStructThis, "F").WithLocation(5, 34), 18120Diagnostic(ErrorCode.ERR_RefReturnStructThis, "F").WithLocation(6, 51)); 18138Diagnostic(ErrorCode.ERR_RefReturnStructThis, "F").WithLocation(5, 34), 18141Diagnostic(ErrorCode.ERR_RefReturnStructThis, "F").WithLocation(6, 51)); 19684Diagnostic(ErrorCode.ERR_RefReturnStructThis, "this").WithLocation(4, 23), 19687Diagnostic(ErrorCode.ERR_RefReturnStructThis, "this").WithLocation(5, 32)); 19709Diagnostic(ErrorCode.ERR_RefReturnStructThis, "this").WithLocation(5, 32)); 19753Diagnostic(ErrorCode.ERR_RefReturnStructThis, "field").WithLocation(11, 26), 19756Diagnostic(ErrorCode.ERR_RefReturnStructThis, "refField = ref this.field").WithLocation(18, 24), 19759Diagnostic(ErrorCode.ERR_RefReturnStructThis, "refField = ref this.field").WithLocation(23, 23), 21803Diagnostic(ErrorCode.ERR_RefReturnStructThis, "_field").WithLocation(5, 39)); 21912Diagnostic(ErrorCode.ERR_RefReturnStructThis, "this").WithLocation(11, 24), 21918Diagnostic(ErrorCode.ERR_RefReturnStructThis, "this").WithLocation(15, 24), 21924Diagnostic(ErrorCode.ERR_RefReturnStructThis, "this").WithLocation(22, 23), 21930Diagnostic(ErrorCode.ERR_RefReturnStructThis, "this").WithLocation(26, 23)); 21948Diagnostic(ErrorCode.ERR_RefReturnStructThis, "_field").WithLocation(5, 37)); 22044Diagnostic(ErrorCode.ERR_RefReturnStructThis, "_t").WithLocation(7, 20)); 22328Diagnostic(ErrorCode.ERR_RefReturnStructThis, "_t").WithLocation(7, 50)); 27437Diagnostic(ErrorCode.ERR_RefReturnStructThis, "this").WithLocation(31, 24), 27443Diagnostic(ErrorCode.ERR_RefReturnStructThis, "this").WithLocation(36, 24));
Semantics\RefLocalsAndReturnsTests.cs (6)
2168Diagnostic(ErrorCode.ERR_RefReturnStructThis, "this").WithLocation(10, 24), 2171Diagnostic(ErrorCode.ERR_RefReturnStructThis, "x").WithLocation(15, 24), 2174Diagnostic(ErrorCode.ERR_RefReturnStructThis, "this.x").WithLocation(20, 24), 3633Diagnostic(ErrorCode.ERR_RefReturnStructThis, "d").WithLocation(10, 20) 3682Diagnostic(ErrorCode.ERR_RefReturnStructThis, "i").WithLocation(13, 20) 3796Diagnostic(ErrorCode.ERR_RefReturnStructThis, "this").WithLocation(6, 20));