annotate run/alias_14.d @ 1576:b3e16c86558e

[Issue 1398] New: GDC doesn't generate correct code <mariusmuja@gmail.com> 2007-08-04 http://d.puremagic.com/issues/show_bug.cgi?id=1398
author thomask
date Thu, 21 Feb 2008 15:20:08 +0000
parents ec5e144583ea
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
242
c69c59de5477 double alias and "need 'this'"
thomask
parents:
diff changeset
1 // $HeadURL$
c69c59de5477 double alias and "need 'this'"
thomask
parents:
diff changeset
2 // $Date$
c69c59de5477 double alias and "need 'this'"
thomask
parents:
diff changeset
3 // $Author$
c69c59de5477 double alias and "need 'this'"
thomask
parents:
diff changeset
4
c69c59de5477 double alias and "need 'this'"
thomask
parents:
diff changeset
5 // @author@ Thomas Kuehne <thomas@kuehne.thisisspam.cn>
c69c59de5477 double alias and "need 'this'"
thomask
parents:
diff changeset
6 // @date@ 2005-01-22
c69c59de5477 double alias and "need 'this'"
thomask
parents:
diff changeset
7 // @uri@ news:csu1gv$see$1@digitaldaemon.com
1384
d3a3e0c251d8 nntp: -> http:
thomask
parents: 1383
diff changeset
8 // @uri@ http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digitalmars.D.bugs&artnum=2737
242
c69c59de5477 double alias and "need 'this'"
thomask
parents:
diff changeset
9
c69c59de5477 double alias and "need 'this'"
thomask
parents:
diff changeset
10 module dstress.run.alias_14;
c69c59de5477 double alias and "need 'this'"
thomask
parents:
diff changeset
11
c69c59de5477 double alias and "need 'this'"
thomask
parents:
diff changeset
12 int status;
c69c59de5477 double alias and "need 'this'"
thomask
parents:
diff changeset
13
c69c59de5477 double alias and "need 'this'"
thomask
parents:
diff changeset
14 class Check{
c69c59de5477 double alias and "need 'this'"
thomask
parents:
diff changeset
15 void sum(byte[] b){
c69c59de5477 double alias and "need 'this'"
thomask
parents:
diff changeset
16 status++;
c69c59de5477 double alias and "need 'this'"
thomask
parents:
diff changeset
17 }
c69c59de5477 double alias and "need 'this'"
thomask
parents:
diff changeset
18
c69c59de5477 double alias and "need 'this'"
thomask
parents:
diff changeset
19 void add(byte b){
c69c59de5477 double alias and "need 'this'"
thomask
parents:
diff changeset
20 assert(0);
c69c59de5477 double alias and "need 'this'"
thomask
parents:
diff changeset
21 }
c69c59de5477 double alias and "need 'this'"
thomask
parents:
diff changeset
22
c69c59de5477 double alias and "need 'this'"
thomask
parents:
diff changeset
23 alias sum write;
c69c59de5477 double alias and "need 'this'"
thomask
parents:
diff changeset
24
c69c59de5477 double alias and "need 'this'"
thomask
parents:
diff changeset
25 void test(){
c69c59de5477 double alias and "need 'this'"
thomask
parents:
diff changeset
26 byte[] buffer;
c69c59de5477 double alias and "need 'this'"
thomask
parents:
diff changeset
27 write(buffer);
c69c59de5477 double alias and "need 'this'"
thomask
parents:
diff changeset
28 }
c69c59de5477 double alias and "need 'this'"
thomask
parents:
diff changeset
29 }
c69c59de5477 double alias and "need 'this'"
thomask
parents:
diff changeset
30
c69c59de5477 double alias and "need 'this'"
thomask
parents:
diff changeset
31
c69c59de5477 double alias and "need 'this'"
thomask
parents:
diff changeset
32 int main(){
c69c59de5477 double alias and "need 'this'"
thomask
parents:
diff changeset
33 Check c = new Check();
c69c59de5477 double alias and "need 'this'"
thomask
parents:
diff changeset
34 status=0;
c69c59de5477 double alias and "need 'this'"
thomask
parents:
diff changeset
35 c.test();
1559
ec5e144583ea D1 -> D2 : 1/N
thomask
parents: 1384
diff changeset
36 if(1 != status){
ec5e144583ea D1 -> D2 : 1/N
thomask
parents: 1384
diff changeset
37 assert(0);
ec5e144583ea D1 -> D2 : 1/N
thomask
parents: 1384
diff changeset
38 }
242
c69c59de5477 double alias and "need 'this'"
thomask
parents:
diff changeset
39 return 0;
1559
ec5e144583ea D1 -> D2 : 1/N
thomask
parents: 1384
diff changeset
40 }