annotate run/o/odd_bug_11_C.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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1297
c6b68d917f83 [Issue 654] Const string member using implicit type inference gives garbage in certain situation
thomask
parents:
diff changeset
1 // $HeadURL$
c6b68d917f83 [Issue 654] Const string member using implicit type inference gives garbage in certain situation
thomask
parents:
diff changeset
2 // $Date$
c6b68d917f83 [Issue 654] Const string member using implicit type inference gives garbage in certain situation
thomask
parents:
diff changeset
3 // $Author$
c6b68d917f83 [Issue 654] Const string member using implicit type inference gives garbage in certain situation
thomask
parents:
diff changeset
4
c6b68d917f83 [Issue 654] Const string member using implicit type inference gives garbage in certain situation
thomask
parents:
diff changeset
5 // @author@ Christopher Pellng <chris@inventivedingo.com>
c6b68d917f83 [Issue 654] Const string member using implicit type inference gives garbage in certain situation
thomask
parents:
diff changeset
6 // @date@ 2006-12-05
c6b68d917f83 [Issue 654] Const string member using implicit type inference gives garbage in certain situation
thomask
parents:
diff changeset
7 // @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=654
c6b68d917f83 [Issue 654] Const string member using implicit type inference gives garbage in certain situation
thomask
parents:
diff changeset
8 // @desc@ [Issue 654] Const string member using implicit type inference gives garbage in certain situation
c6b68d917f83 [Issue 654] Const string member using implicit type inference gives garbage in certain situation
thomask
parents:
diff changeset
9
c6b68d917f83 [Issue 654] Const string member using implicit type inference gives garbage in certain situation
thomask
parents:
diff changeset
10 module dstress.run.o.odd_bug_11_C;
c6b68d917f83 [Issue 654] Const string member using implicit type inference gives garbage in certain situation
thomask
parents:
diff changeset
11
c6b68d917f83 [Issue 654] Const string member using implicit type inference gives garbage in certain situation
thomask
parents:
diff changeset
12 class A {
c6b68d917f83 [Issue 654] Const string member using implicit type inference gives garbage in certain situation
thomask
parents:
diff changeset
13 static MY_CONST_STRING = "hello";
c6b68d917f83 [Issue 654] Const string member using implicit type inference gives garbage in certain situation
thomask
parents:
diff changeset
14
c6b68d917f83 [Issue 654] Const string member using implicit type inference gives garbage in certain situation
thomask
parents:
diff changeset
15 this(char[] cmp) {
c6b68d917f83 [Issue 654] Const string member using implicit type inference gives garbage in certain situation
thomask
parents:
diff changeset
16 if(cmp != MY_CONST_STRING){
c6b68d917f83 [Issue 654] Const string member using implicit type inference gives garbage in certain situation
thomask
parents:
diff changeset
17 assert(0);
c6b68d917f83 [Issue 654] Const string member using implicit type inference gives garbage in certain situation
thomask
parents:
diff changeset
18 }
c6b68d917f83 [Issue 654] Const string member using implicit type inference gives garbage in certain situation
thomask
parents:
diff changeset
19 }
c6b68d917f83 [Issue 654] Const string member using implicit type inference gives garbage in certain situation
thomask
parents:
diff changeset
20 }
c6b68d917f83 [Issue 654] Const string member using implicit type inference gives garbage in certain situation
thomask
parents:
diff changeset
21
c6b68d917f83 [Issue 654] Const string member using implicit type inference gives garbage in certain situation
thomask
parents:
diff changeset
22 void dummy(...){}
c6b68d917f83 [Issue 654] Const string member using implicit type inference gives garbage in certain situation
thomask
parents:
diff changeset
23
c6b68d917f83 [Issue 654] Const string member using implicit type inference gives garbage in certain situation
thomask
parents:
diff changeset
24 void never_called() {
c6b68d917f83 [Issue 654] Const string member using implicit type inference gives garbage in certain situation
thomask
parents:
diff changeset
25 dummy("%s", A.MY_CONST_STRING);
c6b68d917f83 [Issue 654] Const string member using implicit type inference gives garbage in certain situation
thomask
parents:
diff changeset
26 }
c6b68d917f83 [Issue 654] Const string member using implicit type inference gives garbage in certain situation
thomask
parents:
diff changeset
27
c6b68d917f83 [Issue 654] Const string member using implicit type inference gives garbage in certain situation
thomask
parents:
diff changeset
28 int main() {
c6b68d917f83 [Issue 654] Const string member using implicit type inference gives garbage in certain situation
thomask
parents:
diff changeset
29 A a = new A("hello");
c6b68d917f83 [Issue 654] Const string member using implicit type inference gives garbage in certain situation
thomask
parents:
diff changeset
30
c6b68d917f83 [Issue 654] Const string member using implicit type inference gives garbage in certain situation
thomask
parents:
diff changeset
31 return 0;
c6b68d917f83 [Issue 654] Const string member using implicit type inference gives garbage in certain situation
thomask
parents:
diff changeset
32 }