54 references to WRN_AssignmentToSelf
Microsoft.CodeAnalysis.CSharp (5)
Errors\ErrorFacts.cs (2)
282
case ErrorCode.
WRN_AssignmentToSelf
:
1361
or ErrorCode.
WRN_AssignmentToSelf
Generated\ErrorFacts.Generated.cs (1)
107
case ErrorCode.
WRN_AssignmentToSelf
:
Lowering\DiagnosticsPass_Warnings.cs (2)
881
Error(ErrorCode.
WRN_AssignmentToSelf
, node);
925
Error(ErrorCode.
WRN_AssignmentToSelf
, leftArgument);
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (10)
CodeGen\CodeGenDeconstructTests.cs (10)
6794
Diagnostic(ErrorCode.
WRN_AssignmentToSelf
, "x").WithLocation(6, 26)
8232
Diagnostic(ErrorCode.
WRN_AssignmentToSelf
, "x").WithLocation(8, 11),
8235
Diagnostic(ErrorCode.
WRN_AssignmentToSelf
, "this.x").WithLocation(8, 18),
8238
Diagnostic(ErrorCode.
WRN_AssignmentToSelf
, "C.y").WithLocation(8, 26)
8263
Diagnostic(ErrorCode.
WRN_AssignmentToSelf
, "x"),
8266
Diagnostic(ErrorCode.
WRN_AssignmentToSelf
, "y").WithLocation(9, 14),
8269
Diagnostic(ErrorCode.
WRN_AssignmentToSelf
, "z").WithLocation(9, 17)
8298
Diagnostic(ErrorCode.
WRN_AssignmentToSelf
, "x").WithLocation(8, 10)
8328
Diagnostic(ErrorCode.
WRN_AssignmentToSelf
, "x").WithLocation(14, 14)
8413
Diagnostic(ErrorCode.
WRN_AssignmentToSelf
, "x").WithLocation(9, 10)
Microsoft.CodeAnalysis.CSharp.IOperation.UnitTests (1)
IOperation\IOperationTests_ISwitchOperation.cs (1)
1125
Diagnostic(ErrorCode.
WRN_AssignmentToSelf
, "result = result").WithLocation(12, 17)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (38)
Semantics\LambdaTests.cs (1)
1642
Diagnostic(ErrorCode.
WRN_AssignmentToSelf
, "y = y").WithLocation(9, 45),
Semantics\NullableReferenceTypesTests.cs (5)
135312
Diagnostic(ErrorCode.
WRN_AssignmentToSelf
, "a = a").WithLocation(11, 9),
135321
Diagnostic(ErrorCode.
WRN_AssignmentToSelf
, "b.F = b.F").WithLocation(14, 9),
135356
Diagnostic(ErrorCode.
WRN_AssignmentToSelf
, "a = a").WithLocation(15, 9),
135359
Diagnostic(ErrorCode.
WRN_AssignmentToSelf
, "b.A = b.A").WithLocation(18, 9));
135383
Diagnostic(ErrorCode.
WRN_AssignmentToSelf
, "c.F = c.F").WithLocation(10, 9),
Semantics\RefEscapingTests.cs (1)
479
Diagnostic(ErrorCode.
WRN_AssignmentToSelf
, "sp = sp").WithLocation(28, 13)
Semantics\SemanticAnalyzerTests.cs (5)
883
Diagnostic(ErrorCode.
WRN_AssignmentToSelf
, "x = x"),
886
Diagnostic(ErrorCode.
WRN_AssignmentToSelf
, "y = y"),
889
Diagnostic(ErrorCode.
WRN_AssignmentToSelf
, "s1.z = s1.z"),
892
Diagnostic(ErrorCode.
WRN_AssignmentToSelf
, "s2.z = s2.z"),
895
Diagnostic(ErrorCode.
WRN_AssignmentToSelf
, "q = q"));
Semantics\SemanticErrorTests.cs (26)
22359
new ErrorDescription[] { new ErrorDescription { Code = (int)ErrorCode.
WRN_AssignmentToSelf
, Line = 7, Column = 7, IsWarning = true } });
22407
Diagnostic(ErrorCode.
WRN_AssignmentToSelf
, "l = l"),
22410
Diagnostic(ErrorCode.
WRN_AssignmentToSelf
, "p = p"),
22413
Diagnostic(ErrorCode.
WRN_AssignmentToSelf
, "f = f"),
22416
Diagnostic(ErrorCode.
WRN_AssignmentToSelf
, "e = e"));
22452
Diagnostic(ErrorCode.
WRN_AssignmentToSelf
, "f = this.f"),
22455
Diagnostic(ErrorCode.
WRN_AssignmentToSelf
, "e = this.e"),
22458
Diagnostic(ErrorCode.
WRN_AssignmentToSelf
, "sf = sf"),
22461
Diagnostic(ErrorCode.
WRN_AssignmentToSelf
, "se = se"),
22464
Diagnostic(ErrorCode.
WRN_AssignmentToSelf
, "sf = Program.sf"),
22467
Diagnostic(ErrorCode.
WRN_AssignmentToSelf
, "se = Program.se"));
22541
Diagnostic(ErrorCode.
WRN_AssignmentToSelf
, "b = (byte)b"),
22544
Diagnostic(ErrorCode.
WRN_AssignmentToSelf
, "sb = (sbyte)sb"),
22547
Diagnostic(ErrorCode.
WRN_AssignmentToSelf
, "s = (short)s"),
22550
Diagnostic(ErrorCode.
WRN_AssignmentToSelf
, "us = (ushort)us"),
22553
Diagnostic(ErrorCode.
WRN_AssignmentToSelf
, "i = (int)i"),
22556
Diagnostic(ErrorCode.
WRN_AssignmentToSelf
, "ui = (uint)ui"),
22559
Diagnostic(ErrorCode.
WRN_AssignmentToSelf
, "l = (long)l"),
22562
Diagnostic(ErrorCode.
WRN_AssignmentToSelf
, "ul = (ulong)ul"),
22565
Diagnostic(ErrorCode.
WRN_AssignmentToSelf
, "f = (float)f"),
22568
Diagnostic(ErrorCode.
WRN_AssignmentToSelf
, "d = (double)d"),
22571
Diagnostic(ErrorCode.
WRN_AssignmentToSelf
, "m = (decimal)m"),
22574
Diagnostic(ErrorCode.
WRN_AssignmentToSelf
, "bo = (bool)bo"),
22577
Diagnostic(ErrorCode.
WRN_AssignmentToSelf
, "o = (object)o"),
22580
Diagnostic(ErrorCode.
WRN_AssignmentToSelf
, "cl = (C)cl"),
22583
Diagnostic(ErrorCode.
WRN_AssignmentToSelf
, "st = (S)st"));