[Issue 2029] New: Typesefe variadic functions don't work at compile time
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Apr 24 14:36:57 PDT 2008
http://d.puremagic.com/issues/show_bug.cgi?id=2029
Summary: Typesefe variadic functions don't work at compile time
Product: D
Version: 2.013
Platform: PC
OS/Version: Windows
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: bugzilla at digitalmars.com
ReportedBy: bartosz at relisoft.com
The following doesn't compile:
string foo (string [] a...)
{
string result = "";
foreach (s; a)
result ~= s;
return result;
}
mixin (foo ("int ", "x;"));
tError: cannot evaluate foo(cast(invariant(char)[][])((invariant(char)[][2u]
__arrayArg244 = void;
) , (__arrayArg244[0u]) = "int " , (__arrayArg244[1u]) = "x;" , __arrayArg244))
at compile time
attribute argument to mixin must be a string, not
(foo(cast(invariant(char)[][])
((invariant(char)[][2u] __arrayArg244 = void;
) , (__arrayArg244[0u]) = "int " , (__arrayArg244[1u]) = "x;" ,
__arrayArg244)))
--
More information about the Digitalmars-d-bugs
mailing list