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: [email protected]
ReportedBy: [email protected]
--- Comment #0 from Mike Wey <[email protected]> 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: -------