[Issue 5868] static attribute ignored with public static {} blocks
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Jan 26 17:50:05 PST 2012
http://d.puremagic.com/issues/show_bug.cgi?id=5868
Jonathan M Davis <jmdavisProg at gmx.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jmdavisProg at gmx.com
--- Comment #8 from Jonathan M Davis <jmdavisProg at gmx.com> 2012-01-26 17:50:01 PST ---
Invalid attributes are usually ignored in D rather than resulting in an error.
So, it's quite consistent that if static {} has no effect on a constructor, the
compiler wouldn't complain about you putting a constructor within the static
block. Now, whether it's _desirable_ that D function that way is another matter
- in general, IMHO it's definitely a negative that invalid attributes get
ignored rather than resulting in errors - but it's definitely consistent with
the rest of the language.
--
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