Mercurial > projects > ldc
view test/vararg2.d @ 64:b688ad419f8c trunk
[svn r68] Added support for multi-dimensional static arrays.
Several bugfixes to array support.
author | lindquist |
---|---|
date | Thu, 25 Oct 2007 12:09:13 +0200 |
parents | a9d29e9f1fed |
children |
line wrap: on
line source
module vararg2; void func(...) { assert(_arguments.length == 2); assert(_arguments[0] is typeid(int)); int a = *cast(int*)_argptr; _argptr += int.sizeof; assert(_arguments[1] is typeid(int)); a += *cast(int*)_argptr; _argptr += int.sizeof; assert(a == 3); } void main() { func(1,2); }