33 references to ERR_OutVariableCannotBeByRef
Microsoft.CodeAnalysis.CSharp (3)
Binder\Binder_Expressions.cs (2)
3245
diagnostics.Add(ErrorCode.
ERR_OutVariableCannotBeByRef
, refType.Location);
3289
diagnostics.Add(ErrorCode.
ERR_OutVariableCannotBeByRef
, refType.Location);
Errors\ErrorFacts.cs (1)
1903
or ErrorCode.
ERR_OutVariableCannotBeByRef
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (30)
Semantics\RefFieldTests.cs (21)
12770
Diagnostic(ErrorCode.
ERR_OutVariableCannotBeByRef
, "ref R").WithLocation(8, 23),
12776
Diagnostic(ErrorCode.
ERR_OutVariableCannotBeByRef
, "ref readonly R").WithLocation(9, 23),
12788
Diagnostic(ErrorCode.
ERR_OutVariableCannotBeByRef
, "ref R").WithLocation(12, 23),
12794
Diagnostic(ErrorCode.
ERR_OutVariableCannotBeByRef
, "ref var").WithLocation(13, 23),
12800
Diagnostic(ErrorCode.
ERR_OutVariableCannotBeByRef
, "ref readonly R").WithLocation(14, 23),
12806
Diagnostic(ErrorCode.
ERR_OutVariableCannotBeByRef
, "ref readonly var").WithLocation(15, 23),
12815
Diagnostic(ErrorCode.
ERR_OutVariableCannotBeByRef
, "ref var").WithLocation(17, 23),
12821
Diagnostic(ErrorCode.
ERR_OutVariableCannotBeByRef
, "ref readonly var").WithLocation(18, 23),
12839
Diagnostic(ErrorCode.
ERR_OutVariableCannotBeByRef
, "ref R").WithLocation(8, 23),
12842
Diagnostic(ErrorCode.
ERR_OutVariableCannotBeByRef
, "ref readonly R").WithLocation(9, 23),
12854
Diagnostic(ErrorCode.
ERR_OutVariableCannotBeByRef
, "ref R").WithLocation(12, 23),
12860
Diagnostic(ErrorCode.
ERR_OutVariableCannotBeByRef
, "ref var").WithLocation(13, 23),
12866
Diagnostic(ErrorCode.
ERR_OutVariableCannotBeByRef
, "ref readonly R").WithLocation(14, 23),
12872
Diagnostic(ErrorCode.
ERR_OutVariableCannotBeByRef
, "ref readonly var").WithLocation(15, 23),
12875
Diagnostic(ErrorCode.
ERR_OutVariableCannotBeByRef
, "ref var").WithLocation(17, 23),
12878
Diagnostic(ErrorCode.
ERR_OutVariableCannotBeByRef
, "ref readonly var").WithLocation(18, 23),
13028
Diagnostic(ErrorCode.
ERR_OutVariableCannotBeByRef
, "ref R").WithLocation(8, 15),
13034
Diagnostic(ErrorCode.
ERR_OutVariableCannotBeByRef
, "ref var").WithLocation(9, 15),
13040
Diagnostic(ErrorCode.
ERR_OutVariableCannotBeByRef
, "ref readonly R").WithLocation(10, 15),
13046
Diagnostic(ErrorCode.
ERR_OutVariableCannotBeByRef
, "ref readonly var").WithLocation(11, 15),
13740
Diagnostic(ErrorCode.
ERR_OutVariableCannotBeByRef
, "ref var").WithLocation(7, 23)
Semantics\RefLocalsAndReturnsTests.cs (9)
4596
Diagnostic(ErrorCode.
ERR_OutVariableCannotBeByRef
, "ref int").WithLocation(10, 15),
4599
Diagnostic(ErrorCode.
ERR_OutVariableCannotBeByRef
, "ref var").WithLocation(11, 15),
4602
Diagnostic(ErrorCode.
ERR_OutVariableCannotBeByRef
, "ref int").WithLocation(13, 15),
4605
Diagnostic(ErrorCode.
ERR_OutVariableCannotBeByRef
, "ref var").WithLocation(14, 15));
4629
Diagnostic(ErrorCode.
ERR_OutVariableCannotBeByRef
, "ref readonly int").WithLocation(10, 15),
4632
Diagnostic(ErrorCode.
ERR_OutVariableCannotBeByRef
, "ref readonly var").WithLocation(11, 15),
4635
Diagnostic(ErrorCode.
ERR_OutVariableCannotBeByRef
, "ref readonly int").WithLocation(13, 15),
4638
Diagnostic(ErrorCode.
ERR_OutVariableCannotBeByRef
, "ref readonly var").WithLocation(14, 15));
5282
Diagnostic(ErrorCode.
ERR_OutVariableCannotBeByRef
, "ref var").WithLocation(4, 7)