comparison run/o/odd_bug_11_A.d @ 1297:c6b68d917f83

[Issue 654] Const string member using implicit type inference gives garbage in certain situation Christopher Pellng <chris@inventivedingo.com> 2006-12-05 http://d.puremagic.com/issues/show_bug.cgi?id=654
author thomask
date Sat, 30 Dec 2006 15:40:25 +0000
parents
children 36bedfa079e6
comparison
equal deleted inserted replaced
1296:630c47fdf443 1297:c6b68d917f83
1 // $HeadURL$
2 // $Date$
3 // $Author$
4
5 // @author@ Christopher Pellng <chris@inventivedingo.com>
6 // @date@ 2006-12-05
7 // @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=654
8 // @desc@ [Issue 654] Const string member using implicit type inference gives garbage in certain situation
9
10 module dstress.run.o.odd_bug_11_A;
11
12 class A {
13 static const MY_CONST_STRING = "hello";
14
15 this(char[] cmp) {
16 if(cmp != MY_CONST_STRING){
17 assert(0);
18 }
19 }
20 }
21
22 void dummy(...){}
23
24 void never_called() {
25 dummy("%s", A.MY_CONST_STRING);
26 }
27
28 int main() {
29 A a = new A("hello");
30
31 return 0;
32 }