94 references to WRN_NewNotRequired
Microsoft.CodeAnalysis.CSharp (5)
Errors\ErrorFacts.cs (2)
255
case ErrorCode.
WRN_NewNotRequired
:
705
or ErrorCode.
WRN_NewNotRequired
Generated\ErrorFacts.Generated.cs (1)
14
case ErrorCode.
WRN_NewNotRequired
:
Symbols\Source\SourceMemberContainerSymbol_ImplementationChecks.cs (2)
737
diagnostics.Add(ErrorCode.
WRN_NewNotRequired
, symbolLocation, symbol);
1588
diagnostics.Add(ErrorCode.
WRN_NewNotRequired
, hidingMemberLocation, hidingMember);
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (4)
CodeGen\CodeGenOverridingAndHiding.cs (3)
1750
Diagnostic(ErrorCode.
WRN_NewNotRequired
, "Field").WithArguments("Derived3.Field").WithLocation(99, 13),
1918
Diagnostic(ErrorCode.
WRN_NewNotRequired
, "Method").WithArguments("Derived<U>.Method(U, U)"),
1924
Diagnostic(ErrorCode.
WRN_NewNotRequired
, "Method").WithArguments("Derived<U>.Method<V>(V, U, System.Collections.Generic.List<V>, System.Collections.Generic.Dictionary<V, U>)"),
PrivateProtected.cs (1)
709
Diagnostic(ErrorCode.
WRN_NewNotRequired
, "F").WithArguments("B.F()").WithLocation(3, 14)
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (2)
Emit\NumericIntPtrTests.cs (2)
995
Diagnostic(ErrorCode.
WRN_NewNotRequired
, "F1").WithArguments("B3.F1(nuint)").WithLocation(13, 21),
998
Diagnostic(ErrorCode.
WRN_NewNotRequired
, "F2").WithArguments("B3.F2(nint)").WithLocation(14, 21)
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (22)
RefReadonlyParameterTests.cs (2)
6544
Diagnostic(ErrorCode.
WRN_NewNotRequired
, "M1").WithArguments("C.M1(ref readonly int)").WithLocation(8, 21),
6547
Diagnostic(ErrorCode.
WRN_NewNotRequired
, "M2").WithArguments($"C.M2({modifier} int)").WithLocation(9, 21));
Symbols\UserDefinedCompoundAssignmentOperatorsTests.cs (20)
2514
Diagnostic(ErrorCode.
WRN_NewNotRequired
, op).WithArguments("C1.operator " + op + @"()").WithLocation(3, 29),
2517
Diagnostic(ErrorCode.
WRN_NewNotRequired
, op).WithArguments("C1.operator checked " + op + @"()").WithLocation(4, 37)
2554
Diagnostic(ErrorCode.
WRN_NewNotRequired
, op).WithArguments("C1.operator " + op + @"()").WithLocation(3, 38),
2557
Diagnostic(ErrorCode.
WRN_NewNotRequired
, op).WithArguments("C1.operator checked " + op + @"()").WithLocation(4, 46)
2595
Diagnostic(ErrorCode.
WRN_NewNotRequired
, op).WithArguments("C1.operator " + op + @"()").WithLocation(3, 37),
2598
Diagnostic(ErrorCode.
WRN_NewNotRequired
, op).WithArguments("C1.operator checked " + op + @"()").WithLocation(4, 45)
2636
Diagnostic(ErrorCode.
WRN_NewNotRequired
, op).WithArguments("C1.operator " + op + @"()").WithLocation(4, 29),
2639
Diagnostic(ErrorCode.
WRN_NewNotRequired
, op).WithArguments("C1.operator checked " + op + @"()").WithLocation(5, 37)
11178
Diagnostic(ErrorCode.
WRN_NewNotRequired
, op).WithArguments("C1.operator " + op + @"(int)").WithLocation(3, 29),
11181
Diagnostic(ErrorCode.
WRN_NewNotRequired
, op).WithArguments("C1.operator checked " + op + @"(int)").WithLocation(4, 37)
11217
Diagnostic(ErrorCode.
WRN_NewNotRequired
, op).WithArguments("C1.operator " + op + @"(int)").WithLocation(3, 29)
11253
Diagnostic(ErrorCode.
WRN_NewNotRequired
, op).WithArguments("C1.operator " + op + @"(int)").WithLocation(3, 38),
11256
Diagnostic(ErrorCode.
WRN_NewNotRequired
, op).WithArguments("C1.operator checked " + op + @"(int)").WithLocation(4, 46)
11293
Diagnostic(ErrorCode.
WRN_NewNotRequired
, op).WithArguments("C1.operator " + op + @"(int)").WithLocation(3, 38)
11330
Diagnostic(ErrorCode.
WRN_NewNotRequired
, op).WithArguments("C1.operator " + op + @"(int)").WithLocation(3, 37),
11333
Diagnostic(ErrorCode.
WRN_NewNotRequired
, op).WithArguments("C1.operator checked " + op + @"(int)").WithLocation(4, 45)
11370
Diagnostic(ErrorCode.
WRN_NewNotRequired
, op).WithArguments("C1.operator " + op + @"(int)").WithLocation(3, 37)
11407
Diagnostic(ErrorCode.
WRN_NewNotRequired
, op).WithArguments("C1.operator " + op + @"(int)").WithLocation(4, 29),
11410
Diagnostic(ErrorCode.
WRN_NewNotRequired
, op).WithArguments("C1.operator checked " + op + @"(int)").WithLocation(5, 37)
11447
Diagnostic(ErrorCode.
WRN_NewNotRequired
, op).WithArguments("C1.operator " + op + @"(int)").WithLocation(4, 29)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (37)
Semantics\InheritanceBindingTests.cs (29)
4267
Diagnostic(ErrorCode.
WRN_NewNotRequired
, "field").WithArguments("C.field"),
4270
Diagnostic(ErrorCode.
WRN_NewNotRequired
, "Property").WithArguments("C.Property"),
4273
Diagnostic(ErrorCode.
WRN_NewNotRequired
, "Event").WithArguments("C.Event"),
4276
Diagnostic(ErrorCode.
WRN_NewNotRequired
, "Interface").WithArguments("C.Interface"),
4279
Diagnostic(ErrorCode.
WRN_NewNotRequired
, "Class").WithArguments("C.Class"),
4282
Diagnostic(ErrorCode.
WRN_NewNotRequired
, "Struct").WithArguments("C.Struct"),
4285
Diagnostic(ErrorCode.
WRN_NewNotRequired
, "Enum").WithArguments("C.Enum"),
4288
Diagnostic(ErrorCode.
WRN_NewNotRequired
, "Delegate").WithArguments("C.Delegate"),
4291
Diagnostic(ErrorCode.
WRN_NewNotRequired
, "this").WithArguments("C.this[int]"),
4294
Diagnostic(ErrorCode.
WRN_NewNotRequired
, "field").WithArguments("S.field"),
4297
Diagnostic(ErrorCode.
WRN_NewNotRequired
, "Property").WithArguments("S.Property"),
4300
Diagnostic(ErrorCode.
WRN_NewNotRequired
, "Event").WithArguments("S.Event"),
4303
Diagnostic(ErrorCode.
WRN_NewNotRequired
, "Interface").WithArguments("S.Interface"),
4306
Diagnostic(ErrorCode.
WRN_NewNotRequired
, "Class").WithArguments("S.Class"),
4309
Diagnostic(ErrorCode.
WRN_NewNotRequired
, "Struct").WithArguments("S.Struct"),
4312
Diagnostic(ErrorCode.
WRN_NewNotRequired
, "Enum").WithArguments("S.Enum"),
4315
Diagnostic(ErrorCode.
WRN_NewNotRequired
, "Delegate").WithArguments("S.Delegate"),
4318
Diagnostic(ErrorCode.
WRN_NewNotRequired
, "this").WithArguments("S.this[int]"),
4321
Diagnostic(ErrorCode.
WRN_NewNotRequired
, "Method").WithArguments("D.Method()"),
4324
Diagnostic(ErrorCode.
WRN_NewNotRequired
, "Property").WithArguments("D.Property"),
4327
Diagnostic(ErrorCode.
WRN_NewNotRequired
, "Method").WithArguments("Derived.Method()"),
4330
Diagnostic(ErrorCode.
WRN_NewNotRequired
, "Property").WithArguments("Derived.Property"),
6376
Diagnostic(ErrorCode.
WRN_NewNotRequired
, "Method").WithArguments("NS1.Base2.Method"),
6384
Diagnostic(ErrorCode.
WRN_NewNotRequired
, "Property").WithArguments("NS3.Base2.Property<T>"),
6467
Diagnostic(ErrorCode.
WRN_NewNotRequired
, "Property").WithArguments("NS1.Base2.Property<T>")
6499
Diagnostic(ErrorCode.
WRN_NewNotRequired
, "Method").WithArguments("Base.Method()"),
6505
Diagnostic(ErrorCode.
WRN_NewNotRequired
, "Method").WithArguments("Derived.Method<T>()"));
6541
Diagnostic(ErrorCode.
WRN_NewNotRequired
, "MethOd").WithArguments("Derived.MethOd"),
6544
Diagnostic(ErrorCode.
WRN_NewNotRequired
, "METhod").WithArguments("Derived.METhod"),
Semantics\NativeIntegerTests.cs (2)
3252
Diagnostic(ErrorCode.
WRN_NewNotRequired
, "F1").WithArguments("B3.F1(nuint)").WithLocation(13, 21),
3255
Diagnostic(ErrorCode.
WRN_NewNotRequired
, "F2").WithArguments("B3.F2(System.IntPtr)").WithLocation(14, 21)
Semantics\NullableReferenceTypesTests.cs (1)
156456
Diagnostic(ErrorCode.
WRN_NewNotRequired
, "M1").WithArguments("B.M1<T>(T??)").WithLocation(11, 21),
Semantics\TopLevelStatementsTests.cs (5)
745
Diagnostic(ErrorCode.
WRN_NewNotRequired
, "a").WithArguments("<invalid-global-code>.a").WithLocation(2, 12),
2582
Diagnostic(ErrorCode.
WRN_NewNotRequired
, "M").WithArguments("<invalid-global-code>.M()").WithLocation(5, 10)
2613
Diagnostic(ErrorCode.
WRN_NewNotRequired
, "F").WithArguments("<invalid-global-code>.F").WithLocation(5, 9)
2638
Diagnostic(ErrorCode.
WRN_NewNotRequired
, "M").WithArguments("<invalid-global-code>.M()").WithLocation(5, 10)
4372
Diagnostic(ErrorCode.
WRN_NewNotRequired
, "localA").WithArguments("<invalid-global-code>.localA()").WithLocation(2, 10),
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (24)
Symbols\DefaultInterfaceImplementationTests.cs (2)
66091
Diagnostic(ErrorCode.
WRN_NewNotRequired
, "I2").WithArguments("I3.I2<T>").WithLocation(10, 19),
66094
Diagnostic(ErrorCode.
WRN_NewNotRequired
, "I4").WithArguments("C3.I4<T>").WithLocation(23, 26)
Symbols\InterfaceOverriddenOrHiddenMembersTests.cs (1)
47
Diagnostic(ErrorCode.
WRN_NewNotRequired
, "goo").WithArguments("I0.goo(int)"));
Symbols\OverriddenOrHiddenMembersTests.cs (18)
3485
Diagnostic(ErrorCode.
WRN_NewNotRequired
, "Finalize").WithArguments("D1.Finalize"),
3488
Diagnostic(ErrorCode.
WRN_NewNotRequired
, "op_UnaryPlus").WithArguments("D1.op_UnaryPlus"),
3491
Diagnostic(ErrorCode.
WRN_NewNotRequired
, "op_Explicit").WithArguments("D1.op_Explicit"),
3494
Diagnostic(ErrorCode.
WRN_NewNotRequired
, "Finalize").WithArguments("D6.Finalize"),
3497
Diagnostic(ErrorCode.
WRN_NewNotRequired
, "op_UnaryPlus").WithArguments("D6.op_UnaryPlus"),
3500
Diagnostic(ErrorCode.
WRN_NewNotRequired
, "op_Explicit").WithArguments("D6.op_Explicit"),
3503
Diagnostic(ErrorCode.
WRN_NewNotRequired
, "Finalize").WithArguments("D3.Finalize"),
3506
Diagnostic(ErrorCode.
WRN_NewNotRequired
, "Finalize").WithArguments("D5.Finalize"),
3509
Diagnostic(ErrorCode.
WRN_NewNotRequired
, "op_Explicit").WithArguments("D8.op_Explicit(B)"),
3512
Diagnostic(ErrorCode.
WRN_NewNotRequired
, "Finalize").WithArguments("D8.Finalize()"),
3515
Diagnostic(ErrorCode.
WRN_NewNotRequired
, "op_UnaryPlus").WithArguments("D8.op_UnaryPlus(B)"),
3518
Diagnostic(ErrorCode.
WRN_NewNotRequired
, "Finalize").WithArguments("D4.Finalize"),
3521
Diagnostic(ErrorCode.
WRN_NewNotRequired
, "op_Explicit").WithArguments("D7.op_Explicit(B)"),
3524
Diagnostic(ErrorCode.
WRN_NewNotRequired
, "Finalize").WithArguments("D7.Finalize()"),
3527
Diagnostic(ErrorCode.
WRN_NewNotRequired
, "op_UnaryPlus").WithArguments("D7.op_UnaryPlus(B)"),
3530
Diagnostic(ErrorCode.
WRN_NewNotRequired
, "op_Explicit").WithArguments("D2.op_Explicit"),
3533
Diagnostic(ErrorCode.
WRN_NewNotRequired
, "Finalize").WithArguments("D2.Finalize"),
3536
Diagnostic(ErrorCode.
WRN_NewNotRequired
, "op_UnaryPlus").WithArguments("D2.op_UnaryPlus"),
Symbols\Source\EnumTests.cs (2)
251
Diagnostic(ErrorCode.
WRN_NewNotRequired
, "Figure").WithArguments("Program.Figure").WithLocation(9, 14),
254
Diagnostic(ErrorCode.
WRN_NewNotRequired
, "Figure2").WithArguments("Program.Figure2").WithLocation(4, 21)
Symbols\SymbolErrorTests.cs (1)
17586
new ErrorDescription { Code = (int)ErrorCode.
WRN_NewNotRequired
, Line = 11, Column = 24, IsWarning = true });