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)
2542
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)
7417
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "true").WithLocation(11, 18),
7420
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "null").WithLocation(12, 10)
Semantics\PatternMatchingTests4.cs (229)
4484
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "< 10.0").WithLocation(10, 22),
4487
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "< 0").WithLocation(11, 26));
4573
Diagnostic(ErrorCode.
HDN_RedundantPattern
, ">= -40.0").WithLocation(11, 13),
4576
Diagnostic(ErrorCode.
HDN_RedundantPattern
, ">= 0").WithLocation(12, 13));
4899
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "B").WithLocation(5, 21),
5003
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "Derived").WithLocation(4, 20),
5006
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "Derived").WithLocation(7, 15),
5131
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "string").WithLocation(4, 24),
5134
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "string").WithLocation(5, 31),
5176
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "{ Length: >0 }").WithLocation(4, 23),
5179
Diagnostic(ErrorCode.
HDN_RedundantPattern
, ">0").WithLocation(4, 33),
5182
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "{ Length: >0 }").WithLocation(5, 24),
5185
Diagnostic(ErrorCode.
HDN_RedundantPattern
, ">0").WithLocation(5, 34),
5188
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "{ Length: >0 }").WithLocation(7, 23),
5191
Diagnostic(ErrorCode.
HDN_RedundantPattern
, ">0").WithLocation(7, 33),
5528
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "43").WithLocation(3, 26),
5531
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "45").WithLocation(3, 41),
5534
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "43").WithLocation(4, 26),
5537
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "43").WithLocation(5, 40),
5646
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "0").WithLocation(4, 24),
5685
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "false").WithLocation(4, 24),
5691
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "true").WithLocation(6, 24),
5753
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "[]").WithLocation(4, 24),
5968
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "string").WithLocation(2, 20),
6041
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "int").WithLocation(5, 29),
6044
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "int").WithLocation(6, 34),
6056
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "Derived").WithLocation(11, 24),
6143
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "45").WithLocation(8, 53),
6149
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "46").WithLocation(8, 96),
6275
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "43").WithLocation(2, 28),
6278
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "45").WithLocation(2, 43),
6305
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "43").WithLocation(2, 36),
6308
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "45").WithLocation(2, 58),
6335
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "43").WithLocation(2, 34),
6338
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "45").WithLocation(2, 56),
6404
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "{ }").WithLocation(3, 22),
6407
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "null").WithLocation(4, 27),
6410
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "null").WithLocation(5, 21),
6422
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "S { }").WithLocation(9, 22),
6474
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "{ }").WithLocation(3, 18),
6477
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "S2 { }").WithLocation(4, 18));
6521
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "int").WithLocation(18, 27));
6561
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "{ }").WithLocation(3, 26),
6564
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "{ Prop: _ }").WithLocation(5, 26),
6567
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "(_, _)").WithLocation(7, 26),
6570
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "C { }").WithLocation(11, 26),
6573
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "C { Prop: _ }").WithLocation(13, 26),
6576
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "C (_, _)").WithLocation(15, 26));
6616
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "{ }").WithLocation(3, 25),
6619
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "{ Prop: _ }").WithLocation(5, 25),
6622
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "(_, _)").WithLocation(7, 25),
6625
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "C { }").WithLocation(11, 25),
6628
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "C { Prop: _ }").WithLocation(13, 25),
6631
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "C (_, _)").WithLocation(15, 25));
6672
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "{ }").WithLocation(2, 17),
6675
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "{ Prop: _ }").WithLocation(4, 17),
6678
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "(_, _)").WithLocation(6, 17),
6681
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "S2 { }").WithLocation(10, 17),
6684
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "S2 { Prop: _ }").WithLocation(12, 17),
6687
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "S2 (_, _)").WithLocation(14, 17),
6690
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "int").WithLocation(18, 28));
6730
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "{ }").WithLocation(3, 18),
6733
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "{ }").WithLocation(3, 26),
6736
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "{ }").WithLocation(4, 18),
6739
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "{ }").WithLocation(5, 18),
6742
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "{ Prop: _ }").WithLocation(5, 26),
6745
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "{ }").WithLocation(6, 18),
6748
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "{ }").WithLocation(7, 18),
6751
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "(_, _)").WithLocation(7, 26),
6754
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "{ }").WithLocation(8, 18),
6757
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "{ }").WithLocation(9, 18),
6760
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "{ }").WithLocation(11, 18),
6763
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "S2 { }").WithLocation(11, 26),
6766
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "{ }").WithLocation(12, 18),
6769
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "{ }").WithLocation(13, 18),
6772
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "S2 { Prop: _ }").WithLocation(13, 26),
6775
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "{ }").WithLocation(14, 18),
6778
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "{ }").WithLocation(15, 18),
6781
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "S2 (_, _)").WithLocation(15, 26),
6784
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "{ }").WithLocation(16, 18),
6787
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "{ }").WithLocation(17, 18));
6827
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "S2").WithLocation(3, 19),
6830
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "{ }").WithLocation(3, 26),
6833
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "S2").WithLocation(4, 19),
6836
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "S2").WithLocation(5, 19),
6839
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "{ Prop: _ }").WithLocation(5, 26),
6842
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "S2").WithLocation(6, 19),
6845
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "S2").WithLocation(7, 19),
6848
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "(_, _)").WithLocation(7, 26),
6851
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "S2").WithLocation(8, 19),
6854
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "S2").WithLocation(9, 19),
6857
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "S2").WithLocation(11, 19),
6860
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "S2 { }").WithLocation(11, 26),
6863
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "S2").WithLocation(12, 19),
6866
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "S2").WithLocation(13, 19),
6869
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "S2 { Prop: _ }").WithLocation(13, 26),
6872
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "S2").WithLocation(14, 19),
6875
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "S2").WithLocation(15, 19),
6878
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "S2 (_, _)").WithLocation(15, 26),
6881
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "S2").WithLocation(16, 19),
6884
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "S2").WithLocation(17, 19));
6983
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "[..]").WithLocation(2, 24),
6986
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "[.._]").WithLocation(3, 24),
7031
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "[..]").WithLocation(2, 25),
7034
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "[.._]").WithLocation(3, 25),
7037
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "[_, ..]").WithLocation(6, 25),
7040
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "[_, .._]").WithLocation(7, 25));
7073
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "[..]").WithLocation(2, 17),
7076
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "[.._]").WithLocation(3, 17));
7109
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "[..]").WithLocation(2, 24),
7112
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "[.._]").WithLocation(3, 24),
7157
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "[..]").WithLocation(2, 25),
7160
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "[.._]").WithLocation(3, 25),
7163
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "[_, ..]").WithLocation(6, 25),
7166
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "[_, .._]").WithLocation(7, 25));
7204
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "(_, _)").WithLocation(10, 21),
7281
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "43").WithLocation(4, 28),
7284
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "43").WithLocation(5, 36),
7324
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "int").WithLocation(2, 17),
7327
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "int").WithLocation(2, 22),
7330
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "int").WithLocation(6, 17),
7333
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "int").WithLocation(6, 22),
7336
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "int").WithLocation(9, 11),
7339
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "int").WithLocation(9, 16),
7368
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "43").WithLocation(2, 26),
7371
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "45").WithLocation(2, 41),
7397
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "43").WithLocation(2, 34),
7400
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "45").WithLocation(2, 59),
7496
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "43").WithLocation(2, 22),
7499
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "45").WithLocation(2, 37),
7502
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "43").WithLocation(5, 17),
7505
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "45").WithLocation(5, 32),
7508
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "43").WithLocation(11, 22),
7511
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "45").WithLocation(11, 37));
7538
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "43").WithLocation(2, 22),
7541
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "45").WithLocation(2, 37),
7544
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "43").WithLocation(5, 17),
7547
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "45").WithLocation(5, 32),
7550
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "43").WithLocation(11, 22),
7553
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "45").WithLocation(11, 37));
7586
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "43").WithLocation(3, 22),
7589
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "45").WithLocation(3, 37),
7592
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "43").WithLocation(6, 17),
7595
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "45").WithLocation(6, 32),
7598
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "43").WithLocation(12, 22),
7601
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "45").WithLocation(12, 37));
7635
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "43").WithLocation(3, 30),
7638
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "45").WithLocation(3, 52),
7641
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "43").WithLocation(6, 25),
7644
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "45").WithLocation(6, 47),
7647
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "43").WithLocation(12, 30),
7650
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "45").WithLocation(12, 52));
7677
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "43").WithLocation(2, 26),
7680
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "45").WithLocation(2, 41),
7689
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "43").WithLocation(5, 26),
7692
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "45").WithLocation(5, 45),
7733
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "43").WithLocation(2, 26),
7739
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "43").WithLocation(4, 26),
7742
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "_ or _").WithLocation(4, 33),
7745
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "_").WithLocation(4, 38),
7748
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "43").WithLocation(5, 26),
7751
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "43").WithLocation(7, 26),
7757
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "43").WithLocation(10, 36),
7763
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "43").WithLocation(13, 26),
7766
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "var z or var t").WithLocation(13, 32),
7803
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "43").WithLocation(3, 29),
7809
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "43").WithLocation(5, 29),
7812
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "43").WithLocation(6, 29),
7815
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "43").WithLocation(8, 29),
7821
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "43").WithLocation(11, 29),
7864
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "43").WithLocation(2, 26),
7870
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "43").WithLocation(5, 26),
7876
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "43").WithLocation(8, 34),
7882
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "43").WithLocation(11, 26),
7888
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "43").WithLocation(14, 26),
7903
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "43").WithLocation(21, 26),
7906
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "int").WithLocation(21, 30));
7931
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "43").WithLocation(2, 26),
7934
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "45").WithLocation(2, 46),
7943
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "43").WithLocation(5, 26),
7946
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "45").WithLocation(5, 50),
7995
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "43").WithLocation(3, 31),
8007
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "43").WithLocation(7, 39),
8016
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "45").WithLocation(10, 53),
8022
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "45").WithLocation(11, 54));
8059
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "43").WithLocation(5, 26),
8062
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "45").WithLocation(5, 51),
8146
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "1").WithLocation(2, 20),
8152
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "1").WithLocation(5, 25),
8251
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "43").WithLocation(5, 38),
8254
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "45").WithLocation(5, 66),
8278
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "43").WithLocation(11, 30),
8281
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "45").WithLocation(11, 45),
8290
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "(_, _)").WithLocation(13, 40),
8305
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "43").WithLocation(17, 30),
8308
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "45").WithLocation(17, 45),
8323
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "43").WithLocation(21, 30),
8326
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "45").WithLocation(21, 45),
8382
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "43").WithLocation(5, 38),
8385
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "45").WithLocation(5, 66),
8409
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "43").WithLocation(11, 30),
8412
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "45").WithLocation(11, 45),
8421
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "(_, _)").WithLocation(13, 40),
8436
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "43").WithLocation(17, 30),
8439
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "45").WithLocation(17, 45),
8608
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "0").WithLocation(4, 28),
8623
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "0").WithLocation(8, 36),
8641
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "0").WithLocation(14, 32),
8644
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "42").WithLocation(15, 17),
8647
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "43").WithLocation(16, 22));
8671
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "{ Prop1: 43 }").WithLocation(3, 31),
8674
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "43").WithLocation(4, 30)
8862
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "{ P2: 2 }").WithLocation(5, 64),
8865
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "{ P2: 2 }").WithLocation(7, 49)
8933
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "string or null").WithLocation(2, 15),
8939
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "string or null").WithLocation(7, 15),
8948
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "string or null").WithLocation(13, 17),
8951
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "string or null").WithLocation(14, 17));
8975
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "{F: 1 and not 1} and {O: not A or B}").WithLocation(3, 12),
8978
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "not A or B").WithLocation(3, 37),
8981
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "A").WithLocation(3, 41),
9093
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "string").WithLocation(2, 23),
9099
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "string").WithLocation(3, 23),
9111
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "Derived").WithLocation(21, 23),
9129
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "object").WithLocation(37, 23),
9132
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "Base").WithLocation(38, 23),
9135
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "object").WithLocation(41, 23),
9138
Diagnostic(ErrorCode.
HDN_RedundantPattern
, "Base").WithLocation(42, 23));
9245
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),
159330
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),