Mercurial > projects > dstress
comparison run/t/typeof_17_A.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_A; | |
11 | |
12 void* v; | |
13 | |
14 void bar(void* fn){ | |
15 v = cast(void*)fn; | |
16 } | |
17 | |
18 void foo(functype param) { | |
19 param(null); | |
20 } | |
21 | |
22 alias void function(void*) functype; | |
23 | |
24 int main(){ | |
25 v = &main; | |
26 foo(&bar); | |
27 if(null !is v){ | |
28 assert(0); | |
29 } | |
30 | |
31 return 0; | |
32 } |