Mercurial > projects > dstress
view run/o/odd_bug_11_A.d @ 1619:bebc7472a832
Fix #7.
author | Christian Kamm <kamm incasoftware de> |
---|---|
date | Sat, 07 Nov 2009 18:55:30 +0100 |
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; }