view run/o/odd_bug_11_A.d @ 1630:d0efa3ae5522 default tip

run/mini/naked_asm5: New x86_64 ABI passes the arguments in reverse order.
author David Nadlinger <code@klickverbot.at>
date Sat, 23 Apr 2011 22:57:32 +0200
parents 36bedfa079e6
children
line wrap: on
line source

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

// @author@	Christopher Pellng <chris@inventivedingo.com>
// @date@	2006-12-05
// @uri@	http://d.puremagic.com/issues/show_bug.cgi?id=654
// @desc@	[Issue 654] Const string member using implicit type inference gives garbage in certain situation

module dstress.run.o.odd_bug_11_A;

class A {
	static const MY_CONST_STRING = "hello";

	this(string cmp) {
		if(cmp != MY_CONST_STRING){
			assert(0);
		}
	}
}

void dummy(...){}

void never_called() {
	dummy("%s", A.MY_CONST_STRING);
}

int main() {
	A a = new A("hello");

	return 0;
}