view compile/i/inerpret_05_A.d @ 1434:8200aeafb504

r7382@birke: tk | 2007-03-29 15:06:54 +0200 [Issue 1021] CTFE and functions returning void Frits van Bommel <fvbommel@wxs.nl> 2007-03-04 http://d.puremagic.com/issues/show_bug.cgi?id=1021
author thomask
date Sat, 31 Mar 2007 08:23:17 +0000
parents
children
line wrap: on
line source

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

// @author@	 Frits van Bommel <fvbommel@wxs.nl>
// @date@	2007-03-04
// @uri@	http://d.puremagic.com/issues/show_bug.cgi?id=1021
// @desc@	[Issue 1021] CTFE and functions returning void

module dstress.compile.i.interpret_05_A;

void bar(out int x){
	x = 2;
}

int foo() {
	int y;
	bar(y);
	return y;
}

const int z = foo();

static assert(2 == z);