September 30, 2011 [Issue 6746] New: static this() inside struct skipped upon static method call | ||||
---|---|---|---|---|
| ||||
http://d.puremagic.com/issues/show_bug.cgi?id=6746 Summary: static this() inside struct skipped upon static method call Product: D Version: unspecified Platform: Other OS/Version: Mac OS X Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nobody@puremagic.com ReportedBy: andrei@metalanguage.com --- Comment #0 from Andrei Alexandrescu <andrei@metalanguage.com> 2011-09-30 09:40:03 PDT --- A good example is given by core.time itself. Consider. import core.time; static this() { auto t = TickDuration.from!"msecs"(100); } void main(){} This code aborts with a division by zero error. Apparently the call to the static method TickDuration.from is allowed without the @trusted shared static this() being called. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
October 01, 2011 [Issue 6746] static this() inside struct skipped upon static method call | ||||
---|---|---|---|---|
| ||||
Posted in reply to Andrei Alexandrescu | http://d.puremagic.com/issues/show_bug.cgi?id=6746 Walter Bright <bugzilla@digitalmars.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |bugzilla@digitalmars.com Resolution| |FIXED --- Comment #1 from Walter Bright <bugzilla@digitalmars.com> 2011-09-30 20:23:18 PDT --- https://github.com/D-Programming-Language/dmd/commit/42fea4c1f2beb5fa1a83c5cbb8a163d88d3ac3ad -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
Copyright © 1999-2021 by the D Language Foundation