Mercurial > projects > dstress
view run/o/odd_bug_11_D.d @ 1550:f46f0b6ed2d1
[Issue 627] Concatenation of strings to string arrays with ~ corrupts data
Matti Niemenmaa <deewiant@gmail.com>
2006-12-02
http://d.puremagic.com/issues/show_bug.cgi?id=627
author | thomask |
---|---|
date | Mon, 23 Jul 2007 18:42:04 +0000 |
parents | c6b68d917f83 |
children | 36bedfa079e6 |
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_D; class A { static const char[] MY_CONST_STRING = "hello"; this(char[] 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; }