Mercurial > projects > dstress
annotate run/w/with_15_B.d @ 1320:daef239f37cf
sed'ed replacement of new:...http.d.puremagic.com/issues/ with http://d.puremagic.com/issues/show_bug.cgi?...
author | thomask |
---|---|
date | Sun, 31 Dec 2006 19:59:08 +0000 |
parents | 02b54d874f0f |
children |
rev | line source |
---|---|
1128
02b54d874f0f
[Issue 325] New: Overriding members and overloading with alias causes bogus error messages in with().
thomask
parents:
diff
changeset
|
1 // $HeadURL$ |
02b54d874f0f
[Issue 325] New: Overriding members and overloading with alias causes bogus error messages in with().
thomask
parents:
diff
changeset
|
2 // $Date$ |
02b54d874f0f
[Issue 325] New: Overriding members and overloading with alias causes bogus error messages in with().
thomask
parents:
diff
changeset
|
3 // $Author$ |
02b54d874f0f
[Issue 325] New: Overriding members and overloading with alias causes bogus error messages in with().
thomask
parents:
diff
changeset
|
4 |
02b54d874f0f
[Issue 325] New: Overriding members and overloading with alias causes bogus error messages in with().
thomask
parents:
diff
changeset
|
5 // @author@ Chris Miller <chris@dprogramming.com> |
02b54d874f0f
[Issue 325] New: Overriding members and overloading with alias causes bogus error messages in with().
thomask
parents:
diff
changeset
|
6 // @date@ 2006-09-06 |
1320
daef239f37cf
sed'ed replacement of new:...http.d.puremagic.com/issues/ with http://d.puremagic.com/issues/show_bug.cgi?...
thomask
parents:
1128
diff
changeset
|
7 // @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=325 |
1128
02b54d874f0f
[Issue 325] New: Overriding members and overloading with alias causes bogus error messages in with().
thomask
parents:
diff
changeset
|
8 // @desc@ [Issue 325] New: Overriding members and overloading with alias causes bogus error messages in with(). |
02b54d874f0f
[Issue 325] New: Overriding members and overloading with alias causes bogus error messages in with().
thomask
parents:
diff
changeset
|
9 |
02b54d874f0f
[Issue 325] New: Overriding members and overloading with alias causes bogus error messages in with().
thomask
parents:
diff
changeset
|
10 module dstress.run.w.with_15_B; |
02b54d874f0f
[Issue 325] New: Overriding members and overloading with alias causes bogus error messages in with().
thomask
parents:
diff
changeset
|
11 |
02b54d874f0f
[Issue 325] New: Overriding members and overloading with alias causes bogus error messages in with().
thomask
parents:
diff
changeset
|
12 class Base{ |
02b54d874f0f
[Issue 325] New: Overriding members and overloading with alias causes bogus error messages in with().
thomask
parents:
diff
changeset
|
13 int data; |
02b54d874f0f
[Issue 325] New: Overriding members and overloading with alias causes bogus error messages in with().
thomask
parents:
diff
changeset
|
14 |
02b54d874f0f
[Issue 325] New: Overriding members and overloading with alias causes bogus error messages in with().
thomask
parents:
diff
changeset
|
15 void foo(int i){ |
02b54d874f0f
[Issue 325] New: Overriding members and overloading with alias causes bogus error messages in with().
thomask
parents:
diff
changeset
|
16 data = i; |
02b54d874f0f
[Issue 325] New: Overriding members and overloading with alias causes bogus error messages in with().
thomask
parents:
diff
changeset
|
17 } |
02b54d874f0f
[Issue 325] New: Overriding members and overloading with alias causes bogus error messages in with().
thomask
parents:
diff
changeset
|
18 int foo(){ |
02b54d874f0f
[Issue 325] New: Overriding members and overloading with alias causes bogus error messages in with().
thomask
parents:
diff
changeset
|
19 return data; |
02b54d874f0f
[Issue 325] New: Overriding members and overloading with alias causes bogus error messages in with().
thomask
parents:
diff
changeset
|
20 } |
02b54d874f0f
[Issue 325] New: Overriding members and overloading with alias causes bogus error messages in with().
thomask
parents:
diff
changeset
|
21 } |
02b54d874f0f
[Issue 325] New: Overriding members and overloading with alias causes bogus error messages in with().
thomask
parents:
diff
changeset
|
22 |
02b54d874f0f
[Issue 325] New: Overriding members and overloading with alias causes bogus error messages in with().
thomask
parents:
diff
changeset
|
23 class Derived : Base{ |
02b54d874f0f
[Issue 325] New: Overriding members and overloading with alias causes bogus error messages in with().
thomask
parents:
diff
changeset
|
24 override void foo(int i){ |
02b54d874f0f
[Issue 325] New: Overriding members and overloading with alias causes bogus error messages in with().
thomask
parents:
diff
changeset
|
25 super.data = 2 * i; |
02b54d874f0f
[Issue 325] New: Overriding members and overloading with alias causes bogus error messages in with().
thomask
parents:
diff
changeset
|
26 } |
02b54d874f0f
[Issue 325] New: Overriding members and overloading with alias causes bogus error messages in with().
thomask
parents:
diff
changeset
|
27 |
02b54d874f0f
[Issue 325] New: Overriding members and overloading with alias causes bogus error messages in with().
thomask
parents:
diff
changeset
|
28 alias Base.foo foo; |
02b54d874f0f
[Issue 325] New: Overriding members and overloading with alias causes bogus error messages in with().
thomask
parents:
diff
changeset
|
29 } |
02b54d874f0f
[Issue 325] New: Overriding members and overloading with alias causes bogus error messages in with().
thomask
parents:
diff
changeset
|
30 |
02b54d874f0f
[Issue 325] New: Overriding members and overloading with alias causes bogus error messages in with().
thomask
parents:
diff
changeset
|
31 int main(){ |
02b54d874f0f
[Issue 325] New: Overriding members and overloading with alias causes bogus error messages in with().
thomask
parents:
diff
changeset
|
32 Derived d = new Derived(); |
02b54d874f0f
[Issue 325] New: Overriding members and overloading with alias causes bogus error messages in with().
thomask
parents:
diff
changeset
|
33 with(d){ |
02b54d874f0f
[Issue 325] New: Overriding members and overloading with alias causes bogus error messages in with().
thomask
parents:
diff
changeset
|
34 foo = 1; |
02b54d874f0f
[Issue 325] New: Overriding members and overloading with alias causes bogus error messages in with().
thomask
parents:
diff
changeset
|
35 } |
02b54d874f0f
[Issue 325] New: Overriding members and overloading with alias causes bogus error messages in with().
thomask
parents:
diff
changeset
|
36 |
02b54d874f0f
[Issue 325] New: Overriding members and overloading with alias causes bogus error messages in with().
thomask
parents:
diff
changeset
|
37 if(d.foo() != 2){ |
02b54d874f0f
[Issue 325] New: Overriding members and overloading with alias causes bogus error messages in with().
thomask
parents:
diff
changeset
|
38 assert(0); |
02b54d874f0f
[Issue 325] New: Overriding members and overloading with alias causes bogus error messages in with().
thomask
parents:
diff
changeset
|
39 } |
02b54d874f0f
[Issue 325] New: Overriding members and overloading with alias causes bogus error messages in with().
thomask
parents:
diff
changeset
|
40 |
02b54d874f0f
[Issue 325] New: Overriding members and overloading with alias causes bogus error messages in with().
thomask
parents:
diff
changeset
|
41 return 0; |
02b54d874f0f
[Issue 325] New: Overriding members and overloading with alias causes bogus error messages in with().
thomask
parents:
diff
changeset
|
42 } |
02b54d874f0f
[Issue 325] New: Overriding members and overloading with alias causes bogus error messages in with().
thomask
parents:
diff
changeset
|
43 |