Mercurial > projects > dstress
comparison run/overload_07.d @ 0:3269e4627918
init dstress
author | svnowner |
---|---|
date | Sat, 25 Sep 2004 22:33:30 +0000 |
parents | |
children | 3414705c41ac |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:3269e4627918 |
---|---|
1 // $Header: /home/th/Dokumente/Entwicklung/MEIN_CVS/MiniD/src/run/overload_07.d,v 1.1 2004/08/20 23:42:54 th Exp $ | |
2 | |
3 // @author@ Andy Friesen <andy@ikagames.com> | |
4 // @date@ 2004-04-30 | |
5 // @uri@ news://c6s698$2nt$1@digitaldaemon.com | |
6 | |
7 int status; | |
8 | |
9 class MyClass{ | |
10 void foo(){ | |
11 status='N'; | |
12 } | |
13 | |
14 static void foo(int x){ | |
15 status=x; | |
16 } | |
17 } | |
18 | |
19 int main(){ | |
20 MyClass m = new MyClass(); | |
21 | |
22 MyClass.foo('S'); | |
23 assert(status=='S'); | |
24 | |
25 m.foo('s'); | |
26 assert(status=='s'); | |
27 | |
28 m.foo(); | |
29 assert(status=='N'); | |
30 | |
31 return 0; | |
32 } |