view run/b/bug_interpret_96_D.d @ 1361:2346dc04e49f

[Issue 981] CFTE fails in non-template and functions that takes no args. Kevin Bealer <kevinbealer@gmail.com> 2007-02-18 http://d.puremagic.com/issues/show_bug.cgi?id=981
author thomask
date Mon, 26 Feb 2007 11:28:15 +0000
parents
children
line wrap: on
line source

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

// @author@	Kevin Bealer <kevinbealer@gmail.com>
// @date@	2007-02-18
// @uri@	http://d.puremagic.com/issues/show_bug.cgi?id=981
// @desc@	[Issue 981] CFTE fails in non-template and functions that takes no args.

module dstress.run.b.bug_interpret_96_D;

char[] foo(){
	return "abc";
}

struct S{
	const char[] x = foo();
}

int main(){
	S s;
	if("abc" != s.x){
		assert(0);
	}
	return 0;
}