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