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)
135293
Diagnostic(ErrorCode.
WRN_AssignmentToSelf
, "a = a").WithLocation(11, 9),
135302
Diagnostic(ErrorCode.
WRN_AssignmentToSelf
, "b.F = b.F").WithLocation(14, 9),
135337
Diagnostic(ErrorCode.
WRN_AssignmentToSelf
, "a = a").WithLocation(15, 9),
135340
Diagnostic(ErrorCode.
WRN_AssignmentToSelf
, "b.A = b.A").WithLocation(18, 9));
135364
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)
22314
new ErrorDescription[] { new ErrorDescription { Code = (int)ErrorCode.
WRN_AssignmentToSelf
, Line = 7, Column = 7, IsWarning = true } });
22362
Diagnostic(ErrorCode.
WRN_AssignmentToSelf
, "l = l"),
22365
Diagnostic(ErrorCode.
WRN_AssignmentToSelf
, "p = p"),
22368
Diagnostic(ErrorCode.
WRN_AssignmentToSelf
, "f = f"),
22371
Diagnostic(ErrorCode.
WRN_AssignmentToSelf
, "e = e"));
22407
Diagnostic(ErrorCode.
WRN_AssignmentToSelf
, "f = this.f"),
22410
Diagnostic(ErrorCode.
WRN_AssignmentToSelf
, "e = this.e"),
22413
Diagnostic(ErrorCode.
WRN_AssignmentToSelf
, "sf = sf"),
22416
Diagnostic(ErrorCode.
WRN_AssignmentToSelf
, "se = se"),
22419
Diagnostic(ErrorCode.
WRN_AssignmentToSelf
, "sf = Program.sf"),
22422
Diagnostic(ErrorCode.
WRN_AssignmentToSelf
, "se = Program.se"));
22496
Diagnostic(ErrorCode.
WRN_AssignmentToSelf
, "b = (byte)b"),
22499
Diagnostic(ErrorCode.
WRN_AssignmentToSelf
, "sb = (sbyte)sb"),
22502
Diagnostic(ErrorCode.
WRN_AssignmentToSelf
, "s = (short)s"),
22505
Diagnostic(ErrorCode.
WRN_AssignmentToSelf
, "us = (ushort)us"),
22508
Diagnostic(ErrorCode.
WRN_AssignmentToSelf
, "i = (int)i"),
22511
Diagnostic(ErrorCode.
WRN_AssignmentToSelf
, "ui = (uint)ui"),
22514
Diagnostic(ErrorCode.
WRN_AssignmentToSelf
, "l = (long)l"),
22517
Diagnostic(ErrorCode.
WRN_AssignmentToSelf
, "ul = (ulong)ul"),
22520
Diagnostic(ErrorCode.
WRN_AssignmentToSelf
, "f = (float)f"),
22523
Diagnostic(ErrorCode.
WRN_AssignmentToSelf
, "d = (double)d"),
22526
Diagnostic(ErrorCode.
WRN_AssignmentToSelf
, "m = (decimal)m"),
22529
Diagnostic(ErrorCode.
WRN_AssignmentToSelf
, "bo = (bool)bo"),
22532
Diagnostic(ErrorCode.
WRN_AssignmentToSelf
, "o = (object)o"),
22535
Diagnostic(ErrorCode.
WRN_AssignmentToSelf
, "cl = (C)cl"),
22538
Diagnostic(ErrorCode.
WRN_AssignmentToSelf
, "st = (S)st"));