29 references to ERR_MethodArgCantBeRefAny
Microsoft.CodeAnalysis.CSharp (3)
Binder\Binder_Expressions.cs (1)
1213
Error(diagnostics, ErrorCode.
ERR_MethodArgCantBeRefAny
, node, argument.Type);
Errors\ErrorFacts.cs (1)
1205
case ErrorCode.
ERR_MethodArgCantBeRefAny
:
Symbols\Source\ParameterHelpers.cs (1)
663
diagnostics.Add(ErrorCode.
ERR_MethodArgCantBeRefAny
, syntax.Location, typeWithAnnotations.Type);
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (1)
CodeGen\CodeGenDeconstructTests.cs (1)
1749
Diagnostic(ErrorCode.
ERR_MethodArgCantBeRefAny
, "out ArgIterator a").WithArguments("System.ArgIterator").WithLocation(19, 29),
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (11)
Semantics\ArglistTests.cs (1)
228
Diagnostic(ErrorCode.
ERR_MethodArgCantBeRefAny
, "__makeref(tr1)").WithArguments("System.TypedReference").WithLocation(8, 30),
Semantics\FunctionPointerTests.cs (1)
4039
Diagnostic(ErrorCode.
ERR_MethodArgCantBeRefAny
, "ref ArgIterator").WithArguments("System.ArgIterator").WithLocation(5, 35),
Semantics\LambdaTests.cs (1)
637
Diagnostic(ErrorCode.
ERR_MethodArgCantBeRefAny
, "ref TypedReference r").WithArguments("System.TypedReference").WithLocation(6, 20));
Semantics\OutVarTests.cs (5)
19503
Diagnostic(ErrorCode.
ERR_MethodArgCantBeRefAny
, "out System.ArgIterator x").WithArguments("System.ArgIterator").WithLocation(9, 25)
19542
Diagnostic(ErrorCode.
ERR_MethodArgCantBeRefAny
, "out System.ArgIterator x").WithArguments("System.ArgIterator").WithLocation(9, 25)
19583
Diagnostic(ErrorCode.
ERR_MethodArgCantBeRefAny
, "out System.ArgIterator x").WithArguments("System.ArgIterator").WithLocation(11, 25),
19632
Diagnostic(ErrorCode.
ERR_MethodArgCantBeRefAny
, "out System.ArgIterator x").WithArguments("System.ArgIterator").WithLocation(12, 25),
32049
Diagnostic(ErrorCode.
ERR_MethodArgCantBeRefAny
, "out System.ArgIterator x").WithArguments("System.ArgIterator").WithLocation(9, 37),
Semantics\SpanStackSafetyTests.cs (2)
536
Diagnostic(ErrorCode.
ERR_MethodArgCantBeRefAny
, "ref TypedReference ss").WithArguments("System.TypedReference").WithLocation(38, 34),
552
Diagnostic(ErrorCode.
ERR_MethodArgCantBeRefAny
, "ref TypedReference ss").WithArguments("System.TypedReference").WithLocation(38, 34),
Semantics\UnsafeTests.cs (1)
3242
Diagnostic(ErrorCode.
ERR_MethodArgCantBeRefAny
, "ref System.TypedReference r").WithArguments("System.TypedReference").WithLocation(4, 47)
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (14)
Symbols\SymbolErrorTests.cs (14)
15222
Diagnostic(ErrorCode.
ERR_MethodArgCantBeRefAny
, "ref TypedReference t2").WithArguments("System.TypedReference"),
15225
Diagnostic(ErrorCode.
ERR_MethodArgCantBeRefAny
, "out ArgIterator t4").WithArguments("System.ArgIterator"),
15228
Diagnostic(ErrorCode.
ERR_MethodArgCantBeRefAny
, "ref RuntimeArgumentHandle r5").WithArguments("System.RuntimeArgumentHandle"),
15231
Diagnostic(ErrorCode.
ERR_MethodArgCantBeRefAny
, "ref TypedReference t1").WithArguments("System.TypedReference"),
15234
Diagnostic(ErrorCode.
ERR_MethodArgCantBeRefAny
, "__makeref(r3)").WithArguments("System.RuntimeArgumentHandle")
15296
Diagnostic(ErrorCode.
ERR_MethodArgCantBeRefAny
, "ref System.TypedReference tr").WithArguments("System.TypedReference").WithLocation(8, 25),
15299
Diagnostic(ErrorCode.
ERR_MethodArgCantBeRefAny
, "in System.TypedReference tr").WithArguments("System.TypedReference").WithLocation(11, 25),
15302
Diagnostic(ErrorCode.
ERR_MethodArgCantBeRefAny
, "out System.TypedReference tr").WithArguments("System.TypedReference").WithLocation(14, 25),
15305
Diagnostic(ErrorCode.
ERR_MethodArgCantBeRefAny
, "ref System.ArgIterator ai").WithArguments("System.ArgIterator").WithLocation(23, 25),
15308
Diagnostic(ErrorCode.
ERR_MethodArgCantBeRefAny
, "in System.ArgIterator ai").WithArguments("System.ArgIterator").WithLocation(26, 25),
15311
Diagnostic(ErrorCode.
ERR_MethodArgCantBeRefAny
, "out System.ArgIterator ai").WithArguments("System.ArgIterator").WithLocation(29, 25),
15314
Diagnostic(ErrorCode.
ERR_MethodArgCantBeRefAny
, "ref System.RuntimeArgumentHandle ah").WithArguments("System.RuntimeArgumentHandle").WithLocation(38, 25),
15317
Diagnostic(ErrorCode.
ERR_MethodArgCantBeRefAny
, "in System.RuntimeArgumentHandle ah").WithArguments("System.RuntimeArgumentHandle").WithLocation(41, 25),
15320
Diagnostic(ErrorCode.
ERR_MethodArgCantBeRefAny
, "out System.RuntimeArgumentHandle ah").WithArguments("System.RuntimeArgumentHandle").WithLocation(44, 25));