Reporter | Vladimir Reshetnikov (nikov) |
---|---|
Created | Feb 19, 2012 1:09:03 AM |
Updated | Mar 28, 2012 6:35:27 PM |
Resolved | Mar 28, 2012 6:35:27 PM |
Priority | Normal |
Type | Bug |
Fix versions | 7.0 |
State | Fixed |
Assignee | Evgeny Pasynkov (pasynkov) |
Subsystem | No subsystem |
Affected versions | No Affected versions |
Fixed in build | No Fixed in build |
using System; class Program { static void Foo(object x, object y) { if (x as int? == 0) { if (x is int) // 'Expression is always true' is detected correctly { Console.WriteLine(); } } if (y as int? > 0) { if (y is int) // 'Expression is always true' is not detected { Console.WriteLine(); } } } }
(y as int? > 0) implies (y as int? != null) and (x is int)