view run/o/odd_bug_03_C.d @ 579:414368950454

catchup 1/3
author thomask
date Sat, 11 Jun 2005 16:25:27 +0000
parents
children 9dcac8d4e97f
line wrap: on
line source

// $HeadURL$
// $Date$
// $Author$

// @desc@	vararg / char[] / foreach code generation bug
// @author@	zwang <nehzgnaw@gmail.com>
// @date@	2005-05-29
// @uri@	news:d7d2kq$1mc$1@digitaldaemon.com

// @WARNING@ direct use of Phobos

module dstress.run.o.odd_bug_03_C;

import std.format;

void f(...){
	char[] s;

	void putc(dchar c){
		s ~= c;       
	}
    
	std.format.doFormat(&putc, _arguments, _argptr);
    
	assert(s=="mystery");
}

int main(){
	f("mystery");
	return 0;
}