view run/t/tuple_25_B.d @ 1564:1d41f2132ef4

r8717@birke: tk | 2007-09-30 10:45:56 +0200 [Issue 1532] Template instance cannot use class locals as template parameters <samukha@voliacable.com> 2007-09-07 http://d.puremagic.com/issues/show_bug.cgi?id=1532
author thomask
date Sun, 30 Sep 2007 09:46:24 +0000
parents 94c9f2f9af4b
children
line wrap: on
line source

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

// @author@	<onlystupidspamhere@yahoo.se>
// @date@	2007-06-06
// @uri@	http://d.puremagic.com/issues/show_bug.cgi?id=1259
// @desc@	[Issue 1259] Inline build triggers an illegal error msg "Error: S() is not an lvalue"

module dstress.run.t.tuple_25_B;

struct S(T...) {
	S opMul_r(double r) {
		return S();
	}
	
	S!(1) opDiv(R)(R r) {
		return S!(1)();
	}
}

int main() {
	S!(1) a;
	S!(0) b;
	auto c = 1.0 * a;

	if(S!(1)() != c){
		assert(0);
	}
	return 0;
}