digitalmars.D.bugs - [Issue 7611] New: static this() in template is not executed in .lib
- d-bugmail puremagic.com (43/47) Feb 29 2012 http://d.puremagic.com/issues/show_bug.cgi?id=7611
- d-bugmail puremagic.com (11/11) Mar 23 2012 http://d.puremagic.com/issues/show_bug.cgi?id=7611
http://d.puremagic.com/issues/show_bug.cgi?id=7611 Summary: static this() in template is not executed in .lib Product: D Version: D2 Platform: x86 OS/Version: Windows Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nobody puremagic.com ReportedBy: sweatygarlic yahoo.co.jp --- Comment #0 from sweatygarlic yahoo.co.jp 2012-02-29 08:08:17 PST --- The situation is like this.(dmd 2.058) ==================== libtest.d -------------------- template typestring( T ) { string typestring = T.stringof; static this() { assert(0); } } alias typestring!int ti; --------------------dmd -lib -H libtest.dtest.d -------------------- import std.stdio; import libtest; // <- libtest.di is imported. pragma( lib, "libtest.lib" ); alias typestring!uint tui; //mixin typestring!uint tui; // it is no matter, alias or mixin. void main() { //writeln( ti); // <- uncomment to Assertion failure writeln( tui ); // <- with no Assertion failure, "uint" is printed. } --------------------dmd test.d ./test.exe uint==================== When libtest.d is imported, or when I write the body code of the static this() to libtest.di, assertion failure occur. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Feb 29 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7611 Kenji Hara <k.hara.pg gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |DUPLICATE --- Comment #1 from Kenji Hara <k.hara.pg gmail.com> 2012-03-23 23:52:46 PDT --- *** This issue has been marked as a duplicate of issue 7754 *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Mar 23 2012