[Issue 5906] Just pre-conditions at compile-time when arguments are static

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Feb 27 15:56:36 PST 2013


http://d.puremagic.com/issues/show_bug.cgi?id=5906



--- Comment #6 from bearophile_hugs at eml.cc 2013-02-27 15:56:31 PST ---
(In reply to comment #4)

> But if I write code like this:
> 
> void main(string[] args) {
>     byte x = args.length;
> }
> 
> 
> It does not perform that test at compile-time, because it can't, the value is
> known only at run-time.

That code too is statically refused because a size_t is out of bounds of a
byte.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list