[Issue 5524] New: [CTFE] Trouble with typesafe variadic function
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Feb 4 10:32:51 PST 2011
http://d.puremagic.com/issues/show_bug.cgi?id=5524
Summary: [CTFE] Trouble with typesafe variadic function
Product: D
Version: D2
Platform: x86
OS/Version: Windows
Status: NEW
Keywords: rejects-valid
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: bearophile_hugs at eml.cc
--- Comment #0 from bearophile_hugs at eml.cc 2011-02-04 10:30:31 PST ---
Andrej Mitrovic has found this D2 code produces errors:
import std.path : join;
enum rootdir = r"C:\Path\";
enum testdir = join(rootdir, "simple");
void main() {}
I have reduced that bug to:
int foo(int x, int y, int[] more...) {
return 0;
}
enum r = foo(0, 0);
void main() {}
DMD 2.051 prints:
test.d(4): Error: variable __arrayArg1 is used before initialization
test.d(4): Error: cannot evaluate foo(0,0,(int[0u] __arrayArg1 = void;
, cast(int[])__arrayArg1)) at compile time
test.d(4): Error: cannot evaluate foo(0,0,(int[0u] __arrayArg1 = void;
, cast(int[])__arrayArg1)) at compile time
--
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