33 references to ERR_OutVariableCannotBeByRef
Microsoft.CodeAnalysis.CSharp (3)
Binder\Binder_Expressions.cs (2)
2905
diagnostics.Add(ErrorCode.
ERR_OutVariableCannotBeByRef
, refType.Location);
2947
diagnostics.Add(ErrorCode.
ERR_OutVariableCannotBeByRef
, refType.Location);
Errors\ErrorFacts.cs (1)
1837
case ErrorCode.
ERR_OutVariableCannotBeByRef
:
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (30)
Semantics\RefFieldTests.cs (21)
12175
Diagnostic(ErrorCode.
ERR_OutVariableCannotBeByRef
, "ref R").WithLocation(8, 23),
12181
Diagnostic(ErrorCode.
ERR_OutVariableCannotBeByRef
, "ref readonly R").WithLocation(9, 23),
12193
Diagnostic(ErrorCode.
ERR_OutVariableCannotBeByRef
, "ref R").WithLocation(12, 23),
12199
Diagnostic(ErrorCode.
ERR_OutVariableCannotBeByRef
, "ref var").WithLocation(13, 23),
12205
Diagnostic(ErrorCode.
ERR_OutVariableCannotBeByRef
, "ref readonly R").WithLocation(14, 23),
12211
Diagnostic(ErrorCode.
ERR_OutVariableCannotBeByRef
, "ref readonly var").WithLocation(15, 23),
12220
Diagnostic(ErrorCode.
ERR_OutVariableCannotBeByRef
, "ref var").WithLocation(17, 23),
12226
Diagnostic(ErrorCode.
ERR_OutVariableCannotBeByRef
, "ref readonly var").WithLocation(18, 23),
12244
Diagnostic(ErrorCode.
ERR_OutVariableCannotBeByRef
, "ref R").WithLocation(8, 23),
12247
Diagnostic(ErrorCode.
ERR_OutVariableCannotBeByRef
, "ref readonly R").WithLocation(9, 23),
12259
Diagnostic(ErrorCode.
ERR_OutVariableCannotBeByRef
, "ref R").WithLocation(12, 23),
12265
Diagnostic(ErrorCode.
ERR_OutVariableCannotBeByRef
, "ref var").WithLocation(13, 23),
12271
Diagnostic(ErrorCode.
ERR_OutVariableCannotBeByRef
, "ref readonly R").WithLocation(14, 23),
12277
Diagnostic(ErrorCode.
ERR_OutVariableCannotBeByRef
, "ref readonly var").WithLocation(15, 23),
12280
Diagnostic(ErrorCode.
ERR_OutVariableCannotBeByRef
, "ref var").WithLocation(17, 23),
12283
Diagnostic(ErrorCode.
ERR_OutVariableCannotBeByRef
, "ref readonly var").WithLocation(18, 23),
12433
Diagnostic(ErrorCode.
ERR_OutVariableCannotBeByRef
, "ref R").WithLocation(8, 15),
12439
Diagnostic(ErrorCode.
ERR_OutVariableCannotBeByRef
, "ref var").WithLocation(9, 15),
12445
Diagnostic(ErrorCode.
ERR_OutVariableCannotBeByRef
, "ref readonly R").WithLocation(10, 15),
12451
Diagnostic(ErrorCode.
ERR_OutVariableCannotBeByRef
, "ref readonly var").WithLocation(11, 15),
13145
Diagnostic(ErrorCode.
ERR_OutVariableCannotBeByRef
, "ref var").WithLocation(7, 23)
Semantics\RefLocalsAndReturnsTests.cs (9)
4207
Diagnostic(ErrorCode.
ERR_OutVariableCannotBeByRef
, "ref int").WithLocation(10, 15),
4210
Diagnostic(ErrorCode.
ERR_OutVariableCannotBeByRef
, "ref var").WithLocation(11, 15),
4213
Diagnostic(ErrorCode.
ERR_OutVariableCannotBeByRef
, "ref int").WithLocation(13, 15),
4216
Diagnostic(ErrorCode.
ERR_OutVariableCannotBeByRef
, "ref var").WithLocation(14, 15));
4240
Diagnostic(ErrorCode.
ERR_OutVariableCannotBeByRef
, "ref readonly int").WithLocation(10, 15),
4243
Diagnostic(ErrorCode.
ERR_OutVariableCannotBeByRef
, "ref readonly var").WithLocation(11, 15),
4246
Diagnostic(ErrorCode.
ERR_OutVariableCannotBeByRef
, "ref readonly int").WithLocation(13, 15),
4249
Diagnostic(ErrorCode.
ERR_OutVariableCannotBeByRef
, "ref readonly var").WithLocation(14, 15));
4893
Diagnostic(ErrorCode.
ERR_OutVariableCannotBeByRef
, "ref var").WithLocation(4, 7)