33 references to ERR_MethodArgCantBeRefAny
Microsoft.CodeAnalysis.CSharp (3)
Binder\Binder_Expressions.cs (1)
1256
Error(diagnostics, ErrorCode.
ERR_MethodArgCantBeRefAny
, node, argument.Type);
Errors\ErrorFacts.cs (1)
1267
or ErrorCode.
ERR_MethodArgCantBeRefAny
Symbols\Source\ParameterHelpers.cs (1)
883
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.Emit3.UnitTests (9)
RefStructInterfacesTests.cs (2)
21145
Diagnostic(ErrorCode.
ERR_MethodArgCantBeRefAny
, "__makeref(x)").WithArguments("T").WithLocation(7, 36),
21148
Diagnostic(ErrorCode.
ERR_MethodArgCantBeRefAny
, "__makeref(y)").WithArguments("S").WithLocation(12, 36)
Semantics\ExtensionTests.cs (1)
4062
Diagnostic(ErrorCode.
ERR_MethodArgCantBeRefAny
, "ref System.ArgIterator a").WithArguments("System.ArgIterator").WithLocation(3, 15));
Semantics\OutVarTests.cs (6)
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),
19629
Diagnostic(ErrorCode.
ERR_MethodArgCantBeRefAny
, "out System.ArgIterator x").WithArguments("System.ArgIterator").WithLocation(12, 25),
19649
Diagnostic(ErrorCode.
ERR_MethodArgCantBeRefAny
, "out System.ArgIterator x").WithArguments("System.ArgIterator").WithLocation(12, 25),
32108
Diagnostic(ErrorCode.
ERR_MethodArgCantBeRefAny
, "out System.ArgIterator x").WithArguments("System.ArgIterator").WithLocation(9, 37),
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (6)
Semantics\ArglistTests.cs (1)
228
Diagnostic(ErrorCode.
ERR_MethodArgCantBeRefAny
, "__makeref(tr1)").WithArguments("System.TypedReference").WithLocation(8, 30),
Semantics\FunctionPointerTests.cs (1)
4060
Diagnostic(ErrorCode.
ERR_MethodArgCantBeRefAny
, "ref ArgIterator").WithArguments("System.ArgIterator").WithLocation(5, 35),
Semantics\LambdaTests.cs (1)
639
Diagnostic(ErrorCode.
ERR_MethodArgCantBeRefAny
, "ref TypedReference r").WithArguments("System.TypedReference").WithLocation(6, 20));
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)
6065
Diagnostic(ErrorCode.
ERR_MethodArgCantBeRefAny
, "ref System.TypedReference r").WithArguments("System.TypedReference").WithLocation(4, 47)
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (14)
Symbols\SymbolErrorTests.cs (14)
15370
Diagnostic(ErrorCode.
ERR_MethodArgCantBeRefAny
, "ref TypedReference t2").WithArguments("System.TypedReference"),
15373
Diagnostic(ErrorCode.
ERR_MethodArgCantBeRefAny
, "out ArgIterator t4").WithArguments("System.ArgIterator"),
15376
Diagnostic(ErrorCode.
ERR_MethodArgCantBeRefAny
, "ref RuntimeArgumentHandle r5").WithArguments("System.RuntimeArgumentHandle"),
15379
Diagnostic(ErrorCode.
ERR_MethodArgCantBeRefAny
, "ref TypedReference t1").WithArguments("System.TypedReference"),
15382
Diagnostic(ErrorCode.
ERR_MethodArgCantBeRefAny
, "__makeref(r3)").WithArguments("System.RuntimeArgumentHandle")
15444
Diagnostic(ErrorCode.
ERR_MethodArgCantBeRefAny
, "ref System.TypedReference tr").WithArguments("System.TypedReference").WithLocation(8, 25),
15447
Diagnostic(ErrorCode.
ERR_MethodArgCantBeRefAny
, "in System.TypedReference tr").WithArguments("System.TypedReference").WithLocation(11, 25),
15450
Diagnostic(ErrorCode.
ERR_MethodArgCantBeRefAny
, "out System.TypedReference tr").WithArguments("System.TypedReference").WithLocation(14, 25),
15453
Diagnostic(ErrorCode.
ERR_MethodArgCantBeRefAny
, "ref System.ArgIterator ai").WithArguments("System.ArgIterator").WithLocation(23, 25),
15456
Diagnostic(ErrorCode.
ERR_MethodArgCantBeRefAny
, "in System.ArgIterator ai").WithArguments("System.ArgIterator").WithLocation(26, 25),
15459
Diagnostic(ErrorCode.
ERR_MethodArgCantBeRefAny
, "out System.ArgIterator ai").WithArguments("System.ArgIterator").WithLocation(29, 25),
15462
Diagnostic(ErrorCode.
ERR_MethodArgCantBeRefAny
, "ref System.RuntimeArgumentHandle ah").WithArguments("System.RuntimeArgumentHandle").WithLocation(38, 25),
15465
Diagnostic(ErrorCode.
ERR_MethodArgCantBeRefAny
, "in System.RuntimeArgumentHandle ah").WithArguments("System.RuntimeArgumentHandle").WithLocation(41, 25),
15468
Diagnostic(ErrorCode.
ERR_MethodArgCantBeRefAny
, "out System.RuntimeArgumentHandle ah").WithArguments("System.RuntimeArgumentHandle").WithLocation(44, 25));