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