17 references to ERR_RefAssignmentMustHaveIdentityConversion
Microsoft.CodeAnalysis.CSharp (3)
Binder\Binder_Statements.cs (1)
1965
Error(diagnostics, ErrorCode.
ERR_RefAssignmentMustHaveIdentityConversion
, expression.Syntax, targetType);
Binder\ForEachLoopBinder.cs (1)
487
Error(diagnostics, ErrorCode.
ERR_RefAssignmentMustHaveIdentityConversion
, collectionExpr.Syntax, iterationVariableType.Type);
Errors\ErrorFacts.cs (1)
1795
or ErrorCode.
ERR_RefAssignmentMustHaveIdentityConversion
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (14)
Semantics\ForEachTests.cs (3)
3753
Diagnostic(ErrorCode.
ERR_RefAssignmentMustHaveIdentityConversion
, "items").WithArguments("C").WithLocation(4, 21)
3771
Diagnostic(ErrorCode.
ERR_RefAssignmentMustHaveIdentityConversion
, "items").WithArguments("C").WithLocation(4, 30)
3789
Diagnostic(ErrorCode.
ERR_RefAssignmentMustHaveIdentityConversion
, "items").WithArguments("C").WithLocation(4, 30)
Semantics\RefFieldTests.cs (3)
20557
Diagnostic(ErrorCode.
ERR_RefAssignmentMustHaveIdentityConversion
, "x").WithArguments("int").WithLocation(3, 31)
20587
Diagnostic(ErrorCode.
ERR_RefAssignmentMustHaveIdentityConversion
, "x").WithArguments("S2").WithLocation(3, 31)
21373
Diagnostic(ErrorCode.
ERR_RefAssignmentMustHaveIdentityConversion
, "i").WithArguments("dynamic").WithLocation(3, 34)
Semantics\RefLocalsAndReturnsTests.cs (8)
533
Diagnostic(ErrorCode.
ERR_RefAssignmentMustHaveIdentityConversion
, "s").WithArguments("object").WithLocation(12, 18));
1114
Diagnostic(ErrorCode.
ERR_RefAssignmentMustHaveIdentityConversion
, "s").WithArguments("object").WithLocation(7, 37));
1132
Diagnostic(ErrorCode.
ERR_RefAssignmentMustHaveIdentityConversion
, "x").WithArguments("long").WithLocation(7, 35));
3154
Diagnostic(ErrorCode.
ERR_RefAssignmentMustHaveIdentityConversion
, "intVar").WithArguments("int?").WithLocation(12, 43),
3157
Diagnostic(ErrorCode.
ERR_RefAssignmentMustHaveIdentityConversion
, "intVar").WithArguments("dynamic").WithLocation(13, 45),
3160
Diagnostic(ErrorCode.
ERR_RefAssignmentMustHaveIdentityConversion
, "stringVar").WithArguments("System.Collections.Generic.IEnumerable<char>").WithLocation(14, 58),
3163
Diagnostic(ErrorCode.
ERR_RefAssignmentMustHaveIdentityConversion
, "stringVar").WithArguments("System.IFormattable").WithLocation(15, 61));
3757
Diagnostic(ErrorCode.
ERR_RefAssignmentMustHaveIdentityConversion
, "i").WithArguments("int").WithLocation(6, 26)