Mercurial > projects > dstress
annotate run/abstract_07.d @ 311:35a1df98caf1
updated abstract tests to dmd-118
author | thomask |
---|---|
date | Wed, 16 Mar 2005 11:09:23 +0000 |
parents | |
children | 52c9e86b6486 |
rev | line source |
---|---|
311 | 1 // $HeadURL$ |
2 // $Date$ | |
3 // $Author$ | |
4 | |
5 // @author@ Stewart Gordon | |
6 // @date@ 2004-09-24 | |
7 // @uri@ news:cj0qf6$2u2v$1@digitaldaemon.com | |
8 // @url@ nntp://news.digitalmars.com/digitalmars.D.bugs/1940 | |
9 | |
10 module dstress.run.abstract_07; | |
11 | |
12 abstract class A{ | |
13 int test(){ | |
14 return 3; | |
15 } | |
16 } | |
17 | |
18 class B : A{ | |
19 } | |
20 | |
21 int main(){ | |
22 A a = new B(); | |
23 assert(a.test()==3); | |
24 return 0; | |
25 } |