33 references to ERR_OutVariableCannotBeByRef
Microsoft.CodeAnalysis.CSharp (3)
Binder\Binder_Expressions.cs (2)
3244
diagnostics.Add(ErrorCode.
ERR_OutVariableCannotBeByRef
, refType.Location);
3288
diagnostics.Add(ErrorCode.
ERR_OutVariableCannotBeByRef
, refType.Location);
Errors\ErrorFacts.cs (1)
1898
or ErrorCode.
ERR_OutVariableCannotBeByRef
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (30)
Semantics\RefFieldTests.cs (21)
12698
Diagnostic(ErrorCode.
ERR_OutVariableCannotBeByRef
, "ref R").WithLocation(8, 23),
12704
Diagnostic(ErrorCode.
ERR_OutVariableCannotBeByRef
, "ref readonly R").WithLocation(9, 23),
12716
Diagnostic(ErrorCode.
ERR_OutVariableCannotBeByRef
, "ref R").WithLocation(12, 23),
12722
Diagnostic(ErrorCode.
ERR_OutVariableCannotBeByRef
, "ref var").WithLocation(13, 23),
12728
Diagnostic(ErrorCode.
ERR_OutVariableCannotBeByRef
, "ref readonly R").WithLocation(14, 23),
12734
Diagnostic(ErrorCode.
ERR_OutVariableCannotBeByRef
, "ref readonly var").WithLocation(15, 23),
12743
Diagnostic(ErrorCode.
ERR_OutVariableCannotBeByRef
, "ref var").WithLocation(17, 23),
12749
Diagnostic(ErrorCode.
ERR_OutVariableCannotBeByRef
, "ref readonly var").WithLocation(18, 23),
12767
Diagnostic(ErrorCode.
ERR_OutVariableCannotBeByRef
, "ref R").WithLocation(8, 23),
12770
Diagnostic(ErrorCode.
ERR_OutVariableCannotBeByRef
, "ref readonly R").WithLocation(9, 23),
12782
Diagnostic(ErrorCode.
ERR_OutVariableCannotBeByRef
, "ref R").WithLocation(12, 23),
12788
Diagnostic(ErrorCode.
ERR_OutVariableCannotBeByRef
, "ref var").WithLocation(13, 23),
12794
Diagnostic(ErrorCode.
ERR_OutVariableCannotBeByRef
, "ref readonly R").WithLocation(14, 23),
12800
Diagnostic(ErrorCode.
ERR_OutVariableCannotBeByRef
, "ref readonly var").WithLocation(15, 23),
12803
Diagnostic(ErrorCode.
ERR_OutVariableCannotBeByRef
, "ref var").WithLocation(17, 23),
12806
Diagnostic(ErrorCode.
ERR_OutVariableCannotBeByRef
, "ref readonly var").WithLocation(18, 23),
12956
Diagnostic(ErrorCode.
ERR_OutVariableCannotBeByRef
, "ref R").WithLocation(8, 15),
12962
Diagnostic(ErrorCode.
ERR_OutVariableCannotBeByRef
, "ref var").WithLocation(9, 15),
12968
Diagnostic(ErrorCode.
ERR_OutVariableCannotBeByRef
, "ref readonly R").WithLocation(10, 15),
12974
Diagnostic(ErrorCode.
ERR_OutVariableCannotBeByRef
, "ref readonly var").WithLocation(11, 15),
13668
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)