17 references to ERR_RefAssignmentMustHaveIdentityConversion
Microsoft.CodeAnalysis.CSharp (3)
Binder\Binder_Statements.cs (1)
1940
Error(diagnostics, ErrorCode.
ERR_RefAssignmentMustHaveIdentityConversion
, expression.Syntax, targetType);
Binder\ForEachLoopBinder.cs (1)
451
Error(diagnostics, ErrorCode.
ERR_RefAssignmentMustHaveIdentityConversion
, collectionExpr.Syntax, iterationVariableType.Type);
Errors\ErrorFacts.cs (1)
1733
case ErrorCode.
ERR_RefAssignmentMustHaveIdentityConversion
:
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (14)
Semantics\ForEachTests.cs (3)
3706
Diagnostic(ErrorCode.
ERR_RefAssignmentMustHaveIdentityConversion
, "items").WithArguments("C").WithLocation(4, 21)
3724
Diagnostic(ErrorCode.
ERR_RefAssignmentMustHaveIdentityConversion
, "items").WithArguments("C").WithLocation(4, 30)
3742
Diagnostic(ErrorCode.
ERR_RefAssignmentMustHaveIdentityConversion
, "items").WithArguments("C").WithLocation(4, 30)
Semantics\RefFieldTests.cs (3)
19941
Diagnostic(ErrorCode.
ERR_RefAssignmentMustHaveIdentityConversion
, "x").WithArguments("int").WithLocation(3, 31)
19971
Diagnostic(ErrorCode.
ERR_RefAssignmentMustHaveIdentityConversion
, "x").WithArguments("S2").WithLocation(3, 31)
20763
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));
1078
Diagnostic(ErrorCode.
ERR_RefAssignmentMustHaveIdentityConversion
, "s").WithArguments("object").WithLocation(7, 37));
1096
Diagnostic(ErrorCode.
ERR_RefAssignmentMustHaveIdentityConversion
, "x").WithArguments("long").WithLocation(7, 35));
3053
Diagnostic(ErrorCode.
ERR_RefAssignmentMustHaveIdentityConversion
, "intVar").WithArguments("int?").WithLocation(12, 43),
3056
Diagnostic(ErrorCode.
ERR_RefAssignmentMustHaveIdentityConversion
, "intVar").WithArguments("dynamic").WithLocation(13, 45),
3059
Diagnostic(ErrorCode.
ERR_RefAssignmentMustHaveIdentityConversion
, "stringVar").WithArguments("System.Collections.Generic.IEnumerable<char>").WithLocation(14, 58),
3062
Diagnostic(ErrorCode.
ERR_RefAssignmentMustHaveIdentityConversion
, "stringVar").WithArguments("System.IFormattable").WithLocation(15, 61));
3384
Diagnostic(ErrorCode.
ERR_RefAssignmentMustHaveIdentityConversion
, "i").WithArguments("int").WithLocation(6, 26)