annotate tests/mini/vararg2.d @ 883:b52d5de7783f

GC defines and linkage changes.
author Christian Kamm <kamm incasoftware de>
date Thu, 08 Jan 2009 18:20:02 +0100
parents 4ac97ec7c18e
children
rev   line source
lindquist@57 1 module vararg2;
lindquist@57 2
lindquist@57 3 void func(...)
lindquist@57 4 {
lindquist@57 5 assert(_arguments.length == 2);
lindquist@57 6 assert(_arguments[0] is typeid(int));
lindquist@57 7 int a = *cast(int*)_argptr;
kamm@741 8 _argptr += size_t.sizeof;
lindquist@57 9 assert(_arguments[1] is typeid(int));
lindquist@57 10 a += *cast(int*)_argptr;
lindquist@57 11 _argptr += int.sizeof;
lindquist@57 12 assert(a == 3);
lindquist@57 13 }
lindquist@57 14
lindquist@57 15 void main()
lindquist@57 16 {
lindquist@57 17 func(1,2);
lindquist@57 18 }