annotate run/p/ptr_12_A.d @ 1274:fa5b19cd8877

Error: (dg).ptr is not an lvalue Kirk McDonald <kirklin.mcdonald@gmail.com> 2006-12-17 http://d.puremagic.com/issues/show_bug.cgi?id=696
author thomask
date Sat, 23 Dec 2006 16:12:28 +0000
parents
children 902d2c168029
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1274
fa5b19cd8877 Error: (dg).ptr is not an lvalue
thomask
parents:
diff changeset
1 // $HeadURL$
fa5b19cd8877 Error: (dg).ptr is not an lvalue
thomask
parents:
diff changeset
2 // $Date$
fa5b19cd8877 Error: (dg).ptr is not an lvalue
thomask
parents:
diff changeset
3 // $Author$
fa5b19cd8877 Error: (dg).ptr is not an lvalue
thomask
parents:
diff changeset
4
fa5b19cd8877 Error: (dg).ptr is not an lvalue
thomask
parents:
diff changeset
5 // @author@ Kirk McDonald <kirklin.mcdonald@gmail.com>
fa5b19cd8877 Error: (dg).ptr is not an lvalue
thomask
parents:
diff changeset
6 // @date@ 2006-12-17
fa5b19cd8877 Error: (dg).ptr is not an lvalue
thomask
parents:
diff changeset
7 // @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=696
fa5b19cd8877 Error: (dg).ptr is not an lvalue
thomask
parents:
diff changeset
8 // @desc@ Error: (dg).ptr is not an lvalue
fa5b19cd8877 Error: (dg).ptr is not an lvalue
thomask
parents:
diff changeset
9
fa5b19cd8877 Error: (dg).ptr is not an lvalue
thomask
parents:
diff changeset
10 module dstress.run.p.ptr_12_A;
fa5b19cd8877 Error: (dg).ptr is not an lvalue
thomask
parents:
diff changeset
11
fa5b19cd8877 Error: (dg).ptr is not an lvalue
thomask
parents:
diff changeset
12 uint status;
fa5b19cd8877 Error: (dg).ptr is not an lvalue
thomask
parents:
diff changeset
13
fa5b19cd8877 Error: (dg).ptr is not an lvalue
thomask
parents:
diff changeset
14 class A {
fa5b19cd8877 Error: (dg).ptr is not an lvalue
thomask
parents:
diff changeset
15 void foo(){
fa5b19cd8877 Error: (dg).ptr is not an lvalue
thomask
parents:
diff changeset
16 status += 4;
fa5b19cd8877 Error: (dg).ptr is not an lvalue
thomask
parents:
diff changeset
17 }
fa5b19cd8877 Error: (dg).ptr is not an lvalue
thomask
parents:
diff changeset
18 }
fa5b19cd8877 Error: (dg).ptr is not an lvalue
thomask
parents:
diff changeset
19
fa5b19cd8877 Error: (dg).ptr is not an lvalue
thomask
parents:
diff changeset
20 int main() {
fa5b19cd8877 Error: (dg).ptr is not an lvalue
thomask
parents:
diff changeset
21 A a = new A();
fa5b19cd8877 Error: (dg).ptr is not an lvalue
thomask
parents:
diff changeset
22 void delegate() dg;
fa5b19cd8877 Error: (dg).ptr is not an lvalue
thomask
parents:
diff changeset
23
fa5b19cd8877 Error: (dg).ptr is not an lvalue
thomask
parents:
diff changeset
24 dg.ptr = a;
fa5b19cd8877 Error: (dg).ptr is not an lvalue
thomask
parents:
diff changeset
25 dg.funcptr = &A.foo;
fa5b19cd8877 Error: (dg).ptr is not an lvalue
thomask
parents:
diff changeset
26
fa5b19cd8877 Error: (dg).ptr is not an lvalue
thomask
parents:
diff changeset
27 if(status != 0){
fa5b19cd8877 Error: (dg).ptr is not an lvalue
thomask
parents:
diff changeset
28 assert(0);
fa5b19cd8877 Error: (dg).ptr is not an lvalue
thomask
parents:
diff changeset
29 }
fa5b19cd8877 Error: (dg).ptr is not an lvalue
thomask
parents:
diff changeset
30
fa5b19cd8877 Error: (dg).ptr is not an lvalue
thomask
parents:
diff changeset
31 dg();
fa5b19cd8877 Error: (dg).ptr is not an lvalue
thomask
parents:
diff changeset
32
fa5b19cd8877 Error: (dg).ptr is not an lvalue
thomask
parents:
diff changeset
33 if(status != 4){
fa5b19cd8877 Error: (dg).ptr is not an lvalue
thomask
parents:
diff changeset
34 assert(0);
fa5b19cd8877 Error: (dg).ptr is not an lvalue
thomask
parents:
diff changeset
35 }
fa5b19cd8877 Error: (dg).ptr is not an lvalue
thomask
parents:
diff changeset
36
fa5b19cd8877 Error: (dg).ptr is not an lvalue
thomask
parents:
diff changeset
37 return 0;
fa5b19cd8877 Error: (dg).ptr is not an lvalue
thomask
parents:
diff changeset
38 }
fa5b19cd8877 Error: (dg).ptr is not an lvalue
thomask
parents:
diff changeset
39