330 references to HDN_RedundantPattern
Microsoft.CodeAnalysis.CSharp (3)
Binder\DecisionDagBuilder_CheckOrReachability.cs (1)
209
ErrorCode errorCode = shouldWarn(node) ? ErrorCode.WRN_RedundantPattern : ErrorCode.
HDN_RedundantPattern
;
Errors\ErrorFacts.cs (1)
2544
or ErrorCode.
HDN_RedundantPattern
Generated\ErrorFacts.Generated.cs (1)
391
case ErrorCode.
HDN_RedundantPattern
:
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (4)
CodeGen\CodeGenTupleTest.cs (4)
28535
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "false").WithLocation(10, 40),
28538
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "{ }").WithLocation(11, 23),
28541
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "{ }").WithLocation(12, 23),
28544
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "false").WithLocation(12, 39));
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (307)
FlowAnalysis\FlowTests.cs (5)
4562
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "true").WithLocation(36, 45),
4568
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "true").WithLocation(44, 46),
4574
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "false").WithLocation(52, 46),
4589
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "false").WithLocation(76, 52),
4896
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "{ }").WithLocation(44, 43),
Semantics\PatternMatchingTests.cs (9)
6825
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "{}").WithLocation(10, 18),
8881
Diagnostic(ErrorCode.
HDN_RedundantPattern
, @""" """).WithLocation(13, 55),
8884
Diagnostic(ErrorCode.
HDN_RedundantPattern
, @""" """).WithLocation(14, 52),
8887
Diagnostic(ErrorCode.
HDN_RedundantPattern
, @""" "" or """"").WithLocation(14, 52),
8890
Diagnostic(ErrorCode.
HDN_RedundantPattern
, @"""""").WithLocation(15, 50),
10496
Diagnostic(ErrorCode.
HDN_RedundantPattern
, @""" """).WithLocation(15, 55),
10499
Diagnostic(ErrorCode.
HDN_RedundantPattern
, @""" """).WithLocation(16, 52),
10502
Diagnostic(ErrorCode.
HDN_RedundantPattern
, @""" "" or """"").WithLocation(16, 52),
10505
Diagnostic(ErrorCode.
HDN_RedundantPattern
, @"""""").WithLocation(17, 50),
Semantics\PatternMatchingTests_ListPatterns.cs (55)
2650
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "1").WithLocation(8, 27),
2659
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "1").WithLocation(12, 31),
2662
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "2").WithLocation(12, 33),
2665
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "3").WithLocation(12, 35),
2671
Diagnostic(ErrorCode.
HDN_RedundantPattern
, ">=0").WithLocation(14, 31),
2677
Diagnostic(ErrorCode.
HDN_RedundantPattern
, ">=0").WithLocation(16, 28),
2698
Diagnostic(ErrorCode.
HDN_RedundantPattern
, ">= -1").WithLocation(24, 31),
2701
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "> -1").WithLocation(25, 31),
2707
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "<= int.MaxValue - 1").WithLocation(27, 37),
2713
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "< int.MaxValue - 1").WithLocation(29, 37),
2938
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "< bad").WithLocation(11, 31),
2941
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "<= bad").WithLocation(12, 31),
2944
Diagnostic(ErrorCode.
HDN_RedundantPattern
, ">= bad").WithLocation(13, 31),
2947
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "> bad").WithLocation(14, 31),
3739
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "{}").WithLocation(8, 26));
5098
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "null").WithLocation(9, 10),
5101
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "0 or > 1").WithLocation(10, 15),
5107
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "null").WithLocation(16, 10),
5110
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "0 or > 1").WithLocation(17, 15),
5119
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "null").WithLocation(39, 14),
5128
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "0 or > 1").WithLocation(61, 15),
5210
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "null").WithLocation(17, 21),
5349
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "null").WithLocation(17, 18),
5352
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "null").WithLocation(24, 18),
5367
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "[_, _]").WithLocation(55, 20),
5379
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "1").WithLocation(79, 27)
5909
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "> 2").WithLocation(29, 14)
5955
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "> 2").WithLocation(29, 14)
5999
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "0").WithLocation(20, 6)
6048
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "null").WithLocation(14, 6),
6051
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "0 or > 1").WithLocation(15, 14),
6057
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "null").WithLocation(27, 6),
6060
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "0 or > 1").WithLocation(28, 14)
6201
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "< 0").WithLocation(5, 6),
6204
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "0 or > 1").WithLocation(6, 14));
6228
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "< 0").WithLocation(5, 9),
6231
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "0 or > 1").WithLocation(6, 14));
7041
Diagnostic(ErrorCode.
HDN_RedundantPattern
, ">=0").WithLocation(11, 20));
7260
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "I1").WithLocation(126, 27),
7263
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "I1").WithLocation(126, 48),
7528
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "<0").WithLocation(10, 27),
7531
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "0 or >1").WithLocation(10, 44),
7534
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "<0").WithLocation(15, 34),
7537
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "<0").WithLocation(20, 27),
7540
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "0 or >1").WithLocation(21, 23),
7543
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "int.MaxValue").WithLocation(31, 70),
7546
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "<= int.MaxValue - 1").WithLocation(36, 26),
7549
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "<= int.MaxValue - 2").WithLocation(41, 29),
7552
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "0 or 1").WithLocation(41, 68),
7555
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "0").WithLocation(50, 18),
7558
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "0").WithLocation(50, 23));
7591
Diagnostic(ErrorCode.
HDN_RedundantPattern
, ">=1").WithLocation(20, 23));
7672
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "-1").WithLocation(4, 20),
7675
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "{ Length: -1 }").WithLocation(5, 10),
7714
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "{ Length: -1 }").WithLocation(3, 18),
Semantics\PatternMatchingTests2.cs (6)
166
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "3").WithLocation(12, 38),
172
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "3").WithLocation(14, 39),
204
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "3").WithLocation(9, 38),
207
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "3").WithLocation(10, 39)
302
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "false").WithLocation(10, 19));
310
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "false").WithLocation(10, 26));
Semantics\PatternMatchingTests3.cs (2)
7420
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "true").WithLocation(11, 18),
7423
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "null").WithLocation(12, 10)
Semantics\PatternMatchingTests4.cs (229)
4488
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "< 10.0").WithLocation(10, 22),
4491
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "< 0").WithLocation(11, 26));
4577
Diagnostic(ErrorCode.
HDN_RedundantPattern
, ">= -40.0").WithLocation(11, 13),
4580
Diagnostic(ErrorCode.
HDN_RedundantPattern
, ">= 0").WithLocation(12, 13));
4903
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "B").WithLocation(5, 21),
5007
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "Derived").WithLocation(4, 20),
5010
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "Derived").WithLocation(7, 15),
5135
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "string").WithLocation(4, 24),
5138
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "string").WithLocation(5, 31),
5180
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "{ Length: >0 }").WithLocation(4, 23),
5183
Diagnostic(ErrorCode.
HDN_RedundantPattern
, ">0").WithLocation(4, 33),
5186
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "{ Length: >0 }").WithLocation(5, 24),
5189
Diagnostic(ErrorCode.
HDN_RedundantPattern
, ">0").WithLocation(5, 34),
5192
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "{ Length: >0 }").WithLocation(7, 23),
5195
Diagnostic(ErrorCode.
HDN_RedundantPattern
, ">0").WithLocation(7, 33),
5532
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "43").WithLocation(3, 26),
5535
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "45").WithLocation(3, 41),
5538
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "43").WithLocation(4, 26),
5541
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "43").WithLocation(5, 40),
5650
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "0").WithLocation(4, 24),
5689
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "false").WithLocation(4, 24),
5695
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "true").WithLocation(6, 24),
5757
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "[]").WithLocation(4, 24),
5972
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "string").WithLocation(2, 20),
6045
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "int").WithLocation(5, 29),
6048
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "int").WithLocation(6, 34),
6060
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "Derived").WithLocation(11, 24),
6147
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "45").WithLocation(8, 53),
6153
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "46").WithLocation(8, 96),
6279
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "43").WithLocation(2, 28),
6282
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "45").WithLocation(2, 43),
6309
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "43").WithLocation(2, 36),
6312
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "45").WithLocation(2, 58),
6339
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "43").WithLocation(2, 34),
6342
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "45").WithLocation(2, 56),
6408
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "{ }").WithLocation(3, 22),
6411
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "null").WithLocation(4, 27),
6414
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "null").WithLocation(5, 21),
6426
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "S { }").WithLocation(9, 22),
6478
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "{ }").WithLocation(3, 18),
6481
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "S2 { }").WithLocation(4, 18));
6525
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "int").WithLocation(18, 27));
6565
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "{ }").WithLocation(3, 26),
6568
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "{ Prop: _ }").WithLocation(5, 26),
6571
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "(_, _)").WithLocation(7, 26),
6574
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "C { }").WithLocation(11, 26),
6577
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "C { Prop: _ }").WithLocation(13, 26),
6580
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "C (_, _)").WithLocation(15, 26));
6620
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "{ }").WithLocation(3, 25),
6623
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "{ Prop: _ }").WithLocation(5, 25),
6626
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "(_, _)").WithLocation(7, 25),
6629
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "C { }").WithLocation(11, 25),
6632
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "C { Prop: _ }").WithLocation(13, 25),
6635
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "C (_, _)").WithLocation(15, 25));
6676
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "{ }").WithLocation(2, 17),
6679
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "{ Prop: _ }").WithLocation(4, 17),
6682
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "(_, _)").WithLocation(6, 17),
6685
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "S2 { }").WithLocation(10, 17),
6688
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "S2 { Prop: _ }").WithLocation(12, 17),
6691
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "S2 (_, _)").WithLocation(14, 17),
6694
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "int").WithLocation(18, 28));
6734
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "{ }").WithLocation(3, 18),
6737
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "{ }").WithLocation(3, 26),
6740
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "{ }").WithLocation(4, 18),
6743
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "{ }").WithLocation(5, 18),
6746
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "{ Prop: _ }").WithLocation(5, 26),
6749
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "{ }").WithLocation(6, 18),
6752
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "{ }").WithLocation(7, 18),
6755
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "(_, _)").WithLocation(7, 26),
6758
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "{ }").WithLocation(8, 18),
6761
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "{ }").WithLocation(9, 18),
6764
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "{ }").WithLocation(11, 18),
6767
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "S2 { }").WithLocation(11, 26),
6770
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "{ }").WithLocation(12, 18),
6773
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "{ }").WithLocation(13, 18),
6776
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "S2 { Prop: _ }").WithLocation(13, 26),
6779
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "{ }").WithLocation(14, 18),
6782
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "{ }").WithLocation(15, 18),
6785
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "S2 (_, _)").WithLocation(15, 26),
6788
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "{ }").WithLocation(16, 18),
6791
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "{ }").WithLocation(17, 18));
6831
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "S2").WithLocation(3, 19),
6834
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "{ }").WithLocation(3, 26),
6837
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "S2").WithLocation(4, 19),
6840
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "S2").WithLocation(5, 19),
6843
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "{ Prop: _ }").WithLocation(5, 26),
6846
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "S2").WithLocation(6, 19),
6849
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "S2").WithLocation(7, 19),
6852
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "(_, _)").WithLocation(7, 26),
6855
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "S2").WithLocation(8, 19),
6858
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "S2").WithLocation(9, 19),
6861
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "S2").WithLocation(11, 19),
6864
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "S2 { }").WithLocation(11, 26),
6867
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "S2").WithLocation(12, 19),
6870
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "S2").WithLocation(13, 19),
6873
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "S2 { Prop: _ }").WithLocation(13, 26),
6876
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "S2").WithLocation(14, 19),
6879
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "S2").WithLocation(15, 19),
6882
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "S2 (_, _)").WithLocation(15, 26),
6885
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "S2").WithLocation(16, 19),
6888
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "S2").WithLocation(17, 19));
6987
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "[..]").WithLocation(2, 24),
6990
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "[.._]").WithLocation(3, 24),
7035
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "[..]").WithLocation(2, 25),
7038
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "[.._]").WithLocation(3, 25),
7041
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "[_, ..]").WithLocation(6, 25),
7044
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "[_, .._]").WithLocation(7, 25));
7077
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "[..]").WithLocation(2, 17),
7080
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "[.._]").WithLocation(3, 17));
7113
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "[..]").WithLocation(2, 24),
7116
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "[.._]").WithLocation(3, 24),
7161
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "[..]").WithLocation(2, 25),
7164
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "[.._]").WithLocation(3, 25),
7167
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "[_, ..]").WithLocation(6, 25),
7170
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "[_, .._]").WithLocation(7, 25));
7208
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "(_, _)").WithLocation(10, 21),
7285
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "43").WithLocation(4, 28),
7288
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "43").WithLocation(5, 36),
7328
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "int").WithLocation(2, 17),
7331
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "int").WithLocation(2, 22),
7334
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "int").WithLocation(6, 17),
7337
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "int").WithLocation(6, 22),
7340
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "int").WithLocation(9, 11),
7343
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "int").WithLocation(9, 16),
7372
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "43").WithLocation(2, 26),
7375
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "45").WithLocation(2, 41),
7401
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "43").WithLocation(2, 34),
7404
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "45").WithLocation(2, 59),
7500
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "43").WithLocation(2, 22),
7503
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "45").WithLocation(2, 37),
7506
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "43").WithLocation(5, 17),
7509
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "45").WithLocation(5, 32),
7512
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "43").WithLocation(11, 22),
7515
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "45").WithLocation(11, 37));
7542
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "43").WithLocation(2, 22),
7545
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "45").WithLocation(2, 37),
7548
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "43").WithLocation(5, 17),
7551
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "45").WithLocation(5, 32),
7554
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "43").WithLocation(11, 22),
7557
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "45").WithLocation(11, 37));
7590
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "43").WithLocation(3, 22),
7593
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "45").WithLocation(3, 37),
7596
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "43").WithLocation(6, 17),
7599
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "45").WithLocation(6, 32),
7602
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "43").WithLocation(12, 22),
7605
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "45").WithLocation(12, 37));
7639
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "43").WithLocation(3, 30),
7642
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "45").WithLocation(3, 52),
7645
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "43").WithLocation(6, 25),
7648
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "45").WithLocation(6, 47),
7651
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "43").WithLocation(12, 30),
7654
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "45").WithLocation(12, 52));
7681
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "43").WithLocation(2, 26),
7684
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "45").WithLocation(2, 41),
7693
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "43").WithLocation(5, 26),
7696
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "45").WithLocation(5, 45),
7737
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "43").WithLocation(2, 26),
7743
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "43").WithLocation(4, 26),
7746
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "_ or _").WithLocation(4, 33),
7749
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "_").WithLocation(4, 38),
7752
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "43").WithLocation(5, 26),
7755
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "43").WithLocation(7, 26),
7761
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "43").WithLocation(10, 36),
7767
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "43").WithLocation(13, 26),
7770
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "var z or var t").WithLocation(13, 32),
7807
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "43").WithLocation(3, 29),
7813
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "43").WithLocation(5, 29),
7816
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "43").WithLocation(6, 29),
7819
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "43").WithLocation(8, 29),
7825
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "43").WithLocation(11, 29),
7868
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "43").WithLocation(2, 26),
7874
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "43").WithLocation(5, 26),
7880
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "43").WithLocation(8, 34),
7886
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "43").WithLocation(11, 26),
7892
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "43").WithLocation(14, 26),
7907
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "43").WithLocation(21, 26),
7910
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "int").WithLocation(21, 30));
7935
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "43").WithLocation(2, 26),
7938
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "45").WithLocation(2, 46),
7947
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "43").WithLocation(5, 26),
7950
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "45").WithLocation(5, 50),
7999
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "43").WithLocation(3, 31),
8011
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "43").WithLocation(7, 39),
8020
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "45").WithLocation(10, 53),
8026
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "45").WithLocation(11, 54));
8063
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "43").WithLocation(5, 26),
8066
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "45").WithLocation(5, 51),
8150
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "1").WithLocation(2, 20),
8156
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "1").WithLocation(5, 25),
8255
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "43").WithLocation(5, 38),
8258
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "45").WithLocation(5, 66),
8282
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "43").WithLocation(11, 30),
8285
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "45").WithLocation(11, 45),
8294
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "(_, _)").WithLocation(13, 40),
8309
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "43").WithLocation(17, 30),
8312
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "45").WithLocation(17, 45),
8327
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "43").WithLocation(21, 30),
8330
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "45").WithLocation(21, 45),
8386
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "43").WithLocation(5, 38),
8389
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "45").WithLocation(5, 66),
8413
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "43").WithLocation(11, 30),
8416
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "45").WithLocation(11, 45),
8425
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "(_, _)").WithLocation(13, 40),
8440
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "43").WithLocation(17, 30),
8443
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "45").WithLocation(17, 45),
8612
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "0").WithLocation(4, 28),
8627
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "0").WithLocation(8, 36),
8645
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "0").WithLocation(14, 32),
8648
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "42").WithLocation(15, 17),
8651
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "43").WithLocation(16, 22));
8675
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "{ Prop1: 43 }").WithLocation(3, 31),
8678
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "43").WithLocation(4, 30)
8866
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "{ P2: 2 }").WithLocation(5, 64),
8869
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "{ P2: 2 }").WithLocation(7, 49)
8937
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "string or null").WithLocation(2, 15),
8943
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "string or null").WithLocation(7, 15),
8952
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "string or null").WithLocation(13, 17),
8955
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "string or null").WithLocation(14, 17));
8979
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "{F: 1 and not 1} and {O: not A or B}").WithLocation(3, 12),
8982
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "not A or B").WithLocation(3, 37),
8985
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "A").WithLocation(3, 41),
9097
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "string").WithLocation(2, 23),
9103
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "string").WithLocation(3, 23),
9115
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "Derived").WithLocation(21, 23),
9133
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "object").WithLocation(37, 23),
9136
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "Base").WithLocation(38, 23),
9139
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "object").WithLocation(41, 23),
9142
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "Base").WithLocation(42, 23));
9249
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "not null or (C and ({ Prop1: 0 } or { Prop2: 1 }))").WithLocation(3, 30),
Semantics\PatternMatchingTests5.cs (1)
1922
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "false").WithLocation(10, 18),
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (16)
Semantics\NullableReferenceTypesTests.cs (11)
27077
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "true").WithLocation(18, 26)
27146
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "null").WithLocation(17, 39));
27180
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "null").WithLocation(16, 34));
27524
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "null").WithLocation(12, 28),
27589
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "null").WithLocation(14, 33),
27632
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "bool").WithLocation(15, 26),
27702
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "true").WithLocation(18, 50),
52076
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "{ }").WithLocation(38, 39),
52611
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "true").WithLocation(38, 39),
52620
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "true").WithLocation(45, 38),
159327
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "{ }").WithLocation(15, 21),
Semantics\NullableReferenceTypesVsPatterns.cs (5)
1323
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "{}").WithLocation(10, 20),
1326
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "{}").WithLocation(11, 14),
1329
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "{}").WithLocation(12, 14),
1332
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "{}").WithLocation(12, 18),
2734
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "C").WithLocation(36, 17),