[Issue 6784] Compile-time constant assigned with a runtime value
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Jan 31 18:09:45 PST 2012
http://d.puremagic.com/issues/show_bug.cgi?id=6784
yebblies <yebblies at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |yebblies at gmail.com
Platform|x86 |All
Version|D2 |D1 & D2
AssignedTo|nobody at puremagic.com |clugdbug at yahoo.com.au
OS/Version|Windows |All
--- Comment #1 from yebblies <yebblies at gmail.com> 2012-02-01 13:09:43 EST ---
Related to Issue 2414.
What differs here is that
enum uint y = x
Is translated to
enum uint y = this.x
And DotIdExp::optimize does not turn this into a constant value, and there is
no error when it fails when called with result & WANTinterpret.
Unfortunately adding an error causes problems with other code, presumably
because DotIdExp::optimize is use from other places like CallExp::optimize that
expect it to just try and finish without errors.
Reassigning to Don as he fixed 2414 and understands the
constfolding/interpreter code a lot better than I do.
Probably applies to D1/const variables too.
--
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