www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 16440] New: wrong code with -main -c -of


          Issue ID: 16440
           Summary: wrong code with -main -c -of
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Keywords: wrong-code
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: ag0aep6g gmail.com

Found when working on rdmd.


import std.stdio;
static this() { writeln("static this"); }
unittest { writeln("unittest"); }

Prints nothing, should print "static this" and "unittest":

dmd -main -c -oftest.o -unittest test.d
dmd test.o

Aug 28 2016