Mercurial > projects > dstress
view run/v/variadic_argument_07_B.d @ 682:8a97cee4e7a0
David L. Davis <SpottedTiger@yahoo.com>
2005-09-22
news:dgup0c$1j47$1@digitaldaemon.com
author | thomask |
---|---|
date | Sun, 25 Sep 2005 06:31:54 +0000 |
parents | |
children | a929acac9127 |
line wrap: on
line source
// $HeadURL$ // $Date$ // $Author$ // @author@ David L. Davis <SpottedTiger@yahoo.com> // @date@ 2005-09-22 // @uri@ news:dgup0c$1j47$1@digitaldaemon.com module dstress.run.v.variadic_argument_07_B; int counter; void test(char[] s){ assert(s=="string"); counter++; } void test(...){ assert(0); } int main(){ assert(counter==0); test("string"); assert(counter==1); test(cast(char[])"string"); assert(counter==2); test("string"c); assert(counter==3); return 0; }