annotate nocompile/super_09.d @ 756:9a121126b077

major "Torture" review
author thomask
date Sat, 03 Dec 2005 22:19:07 +0000
parents 39f144b0814e
children 52c9e86b6486
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
190
f29443c7054c 1) super()
thomask
parents:
diff changeset
1 // $HeadURL$
f29443c7054c 1) super()
thomask
parents:
diff changeset
2 // $Date$
530
39f144b0814e post DMD-0.123 review [2/n]
thomask
parents: 528
diff changeset
3 // $Author$
190
f29443c7054c 1) super()
thomask
parents:
diff changeset
4
f29443c7054c 1) super()
thomask
parents:
diff changeset
5 // @author@ Thomas Kuehne <thomas-dloop@kuehne.thisisspam.cn>
402
a56ff70d7187 fixed inheritance
thomask
parents: 374
diff changeset
6 // @date@ 2004-12-10
190
f29443c7054c 1) super()
thomask
parents:
diff changeset
7 // @uri@ news:sr8p82-lu3.ln1@kuehne.cn
f29443c7054c 1) super()
thomask
parents:
diff changeset
8 // @url@ nntp://digitalmars.com/digitalmars.D.bugs/2528
f29443c7054c 1) super()
thomask
parents:
diff changeset
9
528
9e0847cf535a pre DMD-0.123 review
thomask
parents: 402
diff changeset
10 // call to "this" before "super"-constructor
190
f29443c7054c 1) super()
thomask
parents:
diff changeset
11
756
9a121126b077 major "Torture" review
thomask
parents: 530
diff changeset
12 // __DSTRESS_ELINE__ 25
374
f87ba6507260 added missing meta-data
thomask
parents: 190
diff changeset
13
190
f29443c7054c 1) super()
thomask
parents:
diff changeset
14 module dstress.nocompile.super_09;
f29443c7054c 1) super()
thomask
parents:
diff changeset
15
f29443c7054c 1) super()
thomask
parents:
diff changeset
16 class Parent{
f29443c7054c 1) super()
thomask
parents:
diff changeset
17 this(int dummy){
528
9e0847cf535a pre DMD-0.123 review
thomask
parents: 402
diff changeset
18 x=2;
190
f29443c7054c 1) super()
thomask
parents:
diff changeset
19 }
528
9e0847cf535a pre DMD-0.123 review
thomask
parents: 402
diff changeset
20 int x;
190
f29443c7054c 1) super()
thomask
parents:
diff changeset
21 }
f29443c7054c 1) super()
thomask
parents:
diff changeset
22
402
a56ff70d7187 fixed inheritance
thomask
parents: 374
diff changeset
23 class Child : Parent{
190
f29443c7054c 1) super()
thomask
parents:
diff changeset
24 this(){
528
9e0847cf535a pre DMD-0.123 review
thomask
parents: 402
diff changeset
25 assert(x==2);
190
f29443c7054c 1) super()
thomask
parents:
diff changeset
26 super(0);
f29443c7054c 1) super()
thomask
parents:
diff changeset
27 }
f29443c7054c 1) super()
thomask
parents:
diff changeset
28 }
f29443c7054c 1) super()
thomask
parents:
diff changeset
29
f29443c7054c 1) super()
thomask
parents:
diff changeset
30 int main(){
f29443c7054c 1) super()
thomask
parents:
diff changeset
31 Child o = new Child();
528
9e0847cf535a pre DMD-0.123 review
thomask
parents: 402
diff changeset
32 return 0;
190
f29443c7054c 1) super()
thomask
parents:
diff changeset
33 }