37 references to ERR_FieldCantBeRefAny
Microsoft.CodeAnalysis.CSharp (3)
Errors\ErrorFacts.cs (1)
989
or ErrorCode.
ERR_FieldCantBeRefAny
Symbols\Source\SourceMemberFieldSymbol.cs (1)
65
diagnostics.Add(ErrorCode.
ERR_FieldCantBeRefAny
, getTypeErrorLocation(), type);
Symbols\Source\SourcePropertySymbolBase.cs (1)
1871
diagnostics.Add(ErrorCode.
ERR_FieldCantBeRefAny
, TypeLocation, type);
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (17)
FieldKeywordTests.cs (4)
8108
Diagnostic(ErrorCode.
ERR_FieldCantBeRefAny
, "TypedReference").WithArguments("System.TypedReference").WithLocation(5, 12),
8111
Diagnostic(ErrorCode.
ERR_FieldCantBeRefAny
, "ArgIterator").WithArguments("System.ArgIterator").WithLocation(6, 5),
8114
Diagnostic(ErrorCode.
ERR_FieldCantBeRefAny
, "TypedReference").WithArguments("System.TypedReference").WithLocation(7, 12),
8117
Diagnostic(ErrorCode.
ERR_FieldCantBeRefAny
, "ArgIterator").WithArguments("System.ArgIterator").WithLocation(8, 5),
Semantics\InlineArrayTests.cs (1)
2135
Diagnostic(ErrorCode.
ERR_FieldCantBeRefAny
, "System.ArgIterator").WithArguments("System.ArgIterator").WithLocation(5, 13),
Semantics\OutVarTests.cs (2)
32111
Diagnostic(ErrorCode.
ERR_FieldCantBeRefAny
, "System.ArgIterator").WithArguments("System.ArgIterator").WithLocation(5, 20),
32114
Diagnostic(ErrorCode.
ERR_FieldCantBeRefAny
, "var").WithArguments("System.ArgIterator").WithLocation(3, 20)
Semantics\PatternMatchingTests_Global.cs (1)
6265
Diagnostic(ErrorCode.
ERR_FieldCantBeRefAny
, "System.ArgIterator").WithArguments("System.ArgIterator").WithLocation(3, 17)
Semantics\PrimaryConstructorTests.cs (1)
20626
Diagnostic(ErrorCode.
ERR_FieldCantBeRefAny
, "System.ArgIterator").WithArguments("System.ArgIterator").WithLocation(3, 2)
Semantics\RecordTests.cs (8)
1263
Diagnostic(ErrorCode.
ERR_FieldCantBeRefAny
, "System.ArgIterator").WithArguments("System.ArgIterator").WithLocation(13, 5),
1266
Diagnostic(ErrorCode.
ERR_FieldCantBeRefAny
, "System.TypedReference").WithArguments("System.TypedReference").WithLocation(14, 5),
1316
Diagnostic(ErrorCode.
ERR_FieldCantBeRefAny
, "System.ArgIterator").WithArguments("System.ArgIterator").WithLocation(14, 12),
1319
Diagnostic(ErrorCode.
ERR_FieldCantBeRefAny
, "System.TypedReference").WithArguments("System.TypedReference").WithLocation(15, 12),
1372
Diagnostic(ErrorCode.
ERR_FieldCantBeRefAny
, "System.ArgIterator").WithArguments("System.ArgIterator").WithLocation(15, 12),
1375
Diagnostic(ErrorCode.
ERR_FieldCantBeRefAny
, "System.TypedReference").WithArguments("System.TypedReference").WithLocation(16, 12),
1515
Diagnostic(ErrorCode.
ERR_FieldCantBeRefAny
, "System.ArgIterator").WithArguments("System.ArgIterator").WithLocation(13, 19),
1518
Diagnostic(ErrorCode.
ERR_FieldCantBeRefAny
, "System.TypedReference").WithArguments("System.TypedReference").WithLocation(14, 19),
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (15)
Semantics\RecordStructTests.cs (10)
1530
Diagnostic(ErrorCode.
ERR_FieldCantBeRefAny
, "System.ArgIterator").WithArguments("System.ArgIterator").WithLocation(13, 5),
1533
Diagnostic(ErrorCode.
ERR_FieldCantBeRefAny
, "System.TypedReference").WithArguments("System.TypedReference").WithLocation(14, 5),
1588
Diagnostic(ErrorCode.
ERR_FieldCantBeRefAny
, "System.ArgIterator").WithArguments("System.ArgIterator").WithLocation(13, 5),
1591
Diagnostic(ErrorCode.
ERR_FieldCantBeRefAny
, "System.TypedReference").WithArguments("System.TypedReference").WithLocation(14, 5),
1641
Diagnostic(ErrorCode.
ERR_FieldCantBeRefAny
, "System.ArgIterator").WithArguments("System.ArgIterator").WithLocation(14, 12),
1644
Diagnostic(ErrorCode.
ERR_FieldCantBeRefAny
, "System.TypedReference").WithArguments("System.TypedReference").WithLocation(15, 12),
1697
Diagnostic(ErrorCode.
ERR_FieldCantBeRefAny
, "System.ArgIterator").WithArguments("System.ArgIterator").WithLocation(15, 12),
1700
Diagnostic(ErrorCode.
ERR_FieldCantBeRefAny
, "System.TypedReference").WithArguments("System.TypedReference").WithLocation(16, 12),
1788
Diagnostic(ErrorCode.
ERR_FieldCantBeRefAny
, "System.ArgIterator").WithArguments("System.ArgIterator").WithLocation(13, 19),
1791
Diagnostic(ErrorCode.
ERR_FieldCantBeRefAny
, "System.TypedReference").WithArguments("System.TypedReference").WithLocation(14, 19),
Semantics\ScriptSemanticsTests.cs (3)
1021
Diagnostic(ErrorCode.
ERR_FieldCantBeRefAny
, "System.RuntimeArgumentHandle").WithArguments("System.RuntimeArgumentHandle"),
1023
Diagnostic(ErrorCode.
ERR_FieldCantBeRefAny
, "System.ArgIterator").WithArguments("System.ArgIterator"),
1025
Diagnostic(ErrorCode.
ERR_FieldCantBeRefAny
, "System.TypedReference").WithArguments("System.TypedReference"));
Semantics\UnsafeTests.cs (2)
6101
Diagnostic(ErrorCode.
ERR_FieldCantBeRefAny
, "System.TypedReference").WithArguments("System.TypedReference").WithLocation(4, 12),
6107
Diagnostic(ErrorCode.
ERR_FieldCantBeRefAny
, "ref System.TypedReference").WithArguments("System.TypedReference").WithLocation(5, 12)
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (2)
Symbols\SymbolErrorTests.cs (2)
11409
Diagnostic(ErrorCode.
ERR_FieldCantBeRefAny
, "System.TypedReference").WithArguments("System.TypedReference"),
11412
Diagnostic(ErrorCode.
ERR_FieldCantBeRefAny
, "System.TypedReference").WithArguments("System.TypedReference"),