[Issue 11149] New: Runtime.args no longer available in static constructors.

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Sep 30 11:30:59 PDT 2013


http://d.puremagic.com/issues/show_bug.cgi?id=11149

           Summary: Runtime.args no longer available in static
                    constructors.
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: regression
          Priority: P2
         Component: druntime
        AssignedTo: nobody at puremagic.com
        ReportedBy: mike-wey at planet.nl


--- Comment #0 from Mike Wey <mike-wey at planet.nl> 2013-09-30 11:30:58 PDT ---
With git head/2.064 core.runtime.Runtime.args always returns null when called
from a static constructor, with 2.063 it used to return the commandline args.

Calling it from main works in both versions.

----
import core.runtime;

string[] test;

shared static this()
{
    test = Runtime.args;
}

void main()
{
    assert(test !is null);
}
----
The assert fails with git head/2.064.

-- 
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