11 references to ERR_BadRefReturnExpressionTree
Microsoft.CodeAnalysis.CSharp (3)
Errors\ErrorFacts.cs (1)
1779
or ErrorCode.
ERR_BadRefReturnExpressionTree
Lowering\DiagnosticsPass_ExpressionTrees.cs (2)
650
Error(ErrorCode.
ERR_BadRefReturnExpressionTree
, node);
668
Error(ErrorCode.
ERR_BadRefReturnExpressionTree
, node);
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (8)
Semantics\RefFieldTests.cs (4)
16163
Diagnostic(ErrorCode.
ERR_BadRefReturnExpressionTree
, "(ref int x, scoped ref int y) => ref x").WithLocation(13, 29),
16175
Diagnostic(ErrorCode.
ERR_BadRefReturnExpressionTree
, "(ref int x, ref int y) => ref x").WithLocation(14, 29),
16205
Diagnostic(ErrorCode.
ERR_BadRefReturnExpressionTree
, "(ref int x, scoped ref int y) => ref x").WithLocation(20, 35),
16217
Diagnostic(ErrorCode.
ERR_BadRefReturnExpressionTree
, "(ref int x, ref int y) => ref x").WithLocation(21, 35),
Semantics\RefLocalsAndReturnsTests.cs (4)
3020
Diagnostic(ErrorCode.
ERR_BadRefReturnExpressionTree
, "(y) => ref x").WithLocation(11, 51));
3043
Diagnostic(ErrorCode.
ERR_BadRefReturnExpressionTree
, "y => ref x").WithLocation(11, 51));
4362
Diagnostic(ErrorCode.
ERR_BadRefReturnExpressionTree
, "() => ref field").WithLocation(13, 27),
4365
Diagnostic(ErrorCode.
ERR_BadRefReturnExpressionTree
, "(int i) => ref field").WithLocation(14, 27));