Mercurial > projects > dstress
annotate run/static_29.d @ 1599:d37b19f7e8bb
Move run/c/case_01 to nocompile.
author | Christian Kamm <kamm incasoftware de> |
---|---|
date | Tue, 09 Sep 2008 17:28:31 +0200 |
parents | 52c9e86b6486 |
children |
rev | line source |
---|---|
288 | 1 // $HeadURL$ |
2 // $Date$ | |
3 // $Author$ | |
4 | |
5 // @author@ Carlos Santander B. <csantander619@gmail.com> | |
6 // @date@ 2005-02-15 | |
7 // @uri@ news:cutof5$1e68$1@digitaldaemon.com | |
1383 | 8 // @uri@ nntp://news.digitalmars.com/D.gnu/1039 |
288 | 9 |
10 module dstress.run.static_29; | |
11 | |
12 class A{ | |
13 static int test(){ | |
14 return 5; | |
15 } | |
16 } | |
17 | |
18 class B:A{ | |
19 int check(){ | |
20 return A.test+1; | |
21 } | |
22 } | |
23 | |
24 int main(){ | |
25 B b = new B(); | |
26 assert(b.check()==6); | |
27 return 0; | |
28 } |