Mercurial > projects > dstress
annotate run/o/odd_bug_11_A.d @ 1560:36bedfa079e6
D1 -> D2 : 2/N
author | thomask |
---|---|
date | Sun, 19 Aug 2007 19:15:01 +0000 |
parents | c6b68d917f83 |
children |
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_A; |
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 const MY_CONST_STRING = "hello"; |
c6b68d917f83
[Issue 654] Const string member using implicit type inference gives garbage in certain situation
thomask
parents:
diff
changeset
|
14 |
1560 | 15 this(string cmp) { |
1297
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 } |