[Issue 11130] Regression (2.064 git-head): Enum members hijack module-scoped symbols in initializers
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Sep 27 11:56:21 PDT 2013
http://d.puremagic.com/issues/show_bug.cgi?id=11130
Walter Bright <bugzilla at digitalmars.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |spec
CC| |bugzilla at digitalmars.com
Severity|regression |normal
--- Comment #1 from Walter Bright <bugzilla at digitalmars.com> 2013-09-27 11:56:20 PDT ---
This was an intended change.
Before, an enum member was not inserted into the symbol table until *after* its
initialization expression was evaluated. But in order for forward references to
work, this is no longer possible, now all the enum member symbols are visible
inside the { }.
I am surprised this broke any code, I don't consider it a reasonable practice,
but you're right that we need to document this behavior.
I'm going to reset this as a "spec" issue.
--
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