annotate run/w/with_15_C.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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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_C;
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 d.foo(3);
02b54d874f0f [Issue 325] New: Overriding members and overloading with alias causes bogus error messages in with().
thomask
parents:
diff changeset
34 with(d){
02b54d874f0f [Issue 325] New: Overriding members and overloading with alias causes bogus error messages in with().
thomask
parents:
diff changeset
35 if(foo != 6){
02b54d874f0f [Issue 325] New: Overriding members and overloading with alias causes bogus error messages in with().
thomask
parents:
diff changeset
36 assert(0);
02b54d874f0f [Issue 325] New: Overriding members and overloading with alias causes bogus error messages in with().
thomask
parents:
diff changeset
37 }
02b54d874f0f [Issue 325] New: Overriding members and overloading with alias causes bogus error messages in with().
thomask
parents:
diff changeset
38 }
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 return 0;
02b54d874f0f [Issue 325] New: Overriding members and overloading with alias causes bogus error messages in with().
thomask
parents:
diff changeset
41 }
02b54d874f0f [Issue 325] New: Overriding members and overloading with alias causes bogus error messages in with().
thomask
parents:
diff changeset
42