[Issue 6784] Compile-time constant assigned with a runtime value

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Wed Nov 5 17:33:19 PST 2014


https://issues.dlang.org/show_bug.cgi?id=6784

hsteoh at quickfur.ath.cx changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |hsteoh at quickfur.ath.cx
         Resolution|---                         |WORKSFORME

--- Comment #4 from hsteoh at quickfur.ath.cx ---
Tested on git HEAD, now the compiler correctly issues an error:

------
test.d(4): Error: value of 'this' is not known at compile time
------

The test code was modified to use size_t instead of uint, since on 64-bit
platforms args.length is ulong, and the compiler will complain that you can't
assign ulong to uint. But that's irrelevant to this bug.

--


More information about the Digitalmars-d-bugs mailing list