http://d.puremagic.com/issues/show_bug.cgi?id=6949
Andrej Mitrovic <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|pull | AssignedTo|[email protected] |[email protected] --- Comment #13 from Andrej Mitrovic <[email protected]> 2012-11-30 04:43:25 PST --- (In reply to comment #12) > Regarding a comment by Don, is it possible to generate a warning/error only in > foo() and not in bar()? > > > void foo(uint x) { > if (x < 0) {} // error or warning here > } > void bar(T)(T x) { > if (x < 0) {} // OK > } > void main() { > foo(5U); > bar(5U); > } I doubt it. Anyway I've closed the pull for now since it's controversial when (or if) we should have warnings/errors for this. If we had a switch like GCC's `-Wtype-limits` then we could implement this check for all cases when the switch is enabled and not worry about it. But Walter is against switches so... Maybe LDC/GDC can or already do support this though. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
