comparison run/t/typeof_17_B.d @ 1544:ab3b56fdd9ab

[Issue 1148] Weird error "... of type TOK146" on recursive type definition Bruno Medeiros <brunodomedeiros+bugz@gmail.com> 2007-05-26 http://d.puremagic.com/issues/show_bug.cgi?id=1148
author thomask
date Sun, 01 Jul 2007 13:22:46 +0000
parents
children
comparison
equal deleted inserted replaced
1543:9597b1b8030f 1544:ab3b56fdd9ab
1 // $HeadURL$
2 // $Date$
3 // $Author$
4
5 // @author@ Bruno Medeiros <brunodomedeiros+bugz@gmail.com>
6 // @date@ 2007-05-26
7 // @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=1148
8 // @desc@ [Issue 1148] Weird error "... of type TOK146" on recursive type definition
9
10 module dstress.run.t.typeof_17_B;
11
12 int count;
13
14 void foo(functype param) {
15 count++;
16 if(param){
17 param(null);
18 }
19 }
20
21 alias typeof(&foo) functype;
22
23 int main(){
24 foo(null);
25 if(count != 1){
26 assert(0);
27 }
28 foo(&foo);
29 if(count != 3){
30 assert(0);
31 }
32
33 return 0;
34 }