33 references to ERR_OutVariableCannotBeByRef
Microsoft.CodeAnalysis.CSharp (3)
Binder\Binder_Expressions.cs (2)
3171
diagnostics.Add(ErrorCode.
ERR_OutVariableCannotBeByRef
, refType.Location);
3215
diagnostics.Add(ErrorCode.
ERR_OutVariableCannotBeByRef
, refType.Location);
Errors\ErrorFacts.cs (1)
1896
or ErrorCode.
ERR_OutVariableCannotBeByRef
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (30)
Semantics\RefFieldTests.cs (21)
12735
Diagnostic(ErrorCode.
ERR_OutVariableCannotBeByRef
, "ref R").WithLocation(8, 23),
12741
Diagnostic(ErrorCode.
ERR_OutVariableCannotBeByRef
, "ref readonly R").WithLocation(9, 23),
12753
Diagnostic(ErrorCode.
ERR_OutVariableCannotBeByRef
, "ref R").WithLocation(12, 23),
12759
Diagnostic(ErrorCode.
ERR_OutVariableCannotBeByRef
, "ref var").WithLocation(13, 23),
12765
Diagnostic(ErrorCode.
ERR_OutVariableCannotBeByRef
, "ref readonly R").WithLocation(14, 23),
12771
Diagnostic(ErrorCode.
ERR_OutVariableCannotBeByRef
, "ref readonly var").WithLocation(15, 23),
12780
Diagnostic(ErrorCode.
ERR_OutVariableCannotBeByRef
, "ref var").WithLocation(17, 23),
12786
Diagnostic(ErrorCode.
ERR_OutVariableCannotBeByRef
, "ref readonly var").WithLocation(18, 23),
12804
Diagnostic(ErrorCode.
ERR_OutVariableCannotBeByRef
, "ref R").WithLocation(8, 23),
12807
Diagnostic(ErrorCode.
ERR_OutVariableCannotBeByRef
, "ref readonly R").WithLocation(9, 23),
12819
Diagnostic(ErrorCode.
ERR_OutVariableCannotBeByRef
, "ref R").WithLocation(12, 23),
12825
Diagnostic(ErrorCode.
ERR_OutVariableCannotBeByRef
, "ref var").WithLocation(13, 23),
12831
Diagnostic(ErrorCode.
ERR_OutVariableCannotBeByRef
, "ref readonly R").WithLocation(14, 23),
12837
Diagnostic(ErrorCode.
ERR_OutVariableCannotBeByRef
, "ref readonly var").WithLocation(15, 23),
12840
Diagnostic(ErrorCode.
ERR_OutVariableCannotBeByRef
, "ref var").WithLocation(17, 23),
12843
Diagnostic(ErrorCode.
ERR_OutVariableCannotBeByRef
, "ref readonly var").WithLocation(18, 23),
12993
Diagnostic(ErrorCode.
ERR_OutVariableCannotBeByRef
, "ref R").WithLocation(8, 15),
12999
Diagnostic(ErrorCode.
ERR_OutVariableCannotBeByRef
, "ref var").WithLocation(9, 15),
13005
Diagnostic(ErrorCode.
ERR_OutVariableCannotBeByRef
, "ref readonly R").WithLocation(10, 15),
13011
Diagnostic(ErrorCode.
ERR_OutVariableCannotBeByRef
, "ref readonly var").WithLocation(11, 15),
13705
Diagnostic(ErrorCode.
ERR_OutVariableCannotBeByRef
, "ref var").WithLocation(7, 23)
Semantics\RefLocalsAndReturnsTests.cs (9)
4602
Diagnostic(ErrorCode.
ERR_OutVariableCannotBeByRef
, "ref int").WithLocation(10, 15),
4605
Diagnostic(ErrorCode.
ERR_OutVariableCannotBeByRef
, "ref var").WithLocation(11, 15),
4608
Diagnostic(ErrorCode.
ERR_OutVariableCannotBeByRef
, "ref int").WithLocation(13, 15),
4611
Diagnostic(ErrorCode.
ERR_OutVariableCannotBeByRef
, "ref var").WithLocation(14, 15));
4635
Diagnostic(ErrorCode.
ERR_OutVariableCannotBeByRef
, "ref readonly int").WithLocation(10, 15),
4638
Diagnostic(ErrorCode.
ERR_OutVariableCannotBeByRef
, "ref readonly var").WithLocation(11, 15),
4641
Diagnostic(ErrorCode.
ERR_OutVariableCannotBeByRef
, "ref readonly int").WithLocation(13, 15),
4644
Diagnostic(ErrorCode.
ERR_OutVariableCannotBeByRef
, "ref readonly var").WithLocation(14, 15));
5288
Diagnostic(ErrorCode.
ERR_OutVariableCannotBeByRef
, "ref var").WithLocation(4, 7)