Mercurial > projects > dstress
comparison nocompile/b/bug_tree_inline_1902_B.d @ 1571:b6eb7f46f42c
[Issue 1813] static function parametrized with alias used with delegate throws an internal compiler error.
<llucax@gmail.com>
2008-02-01
http://d.puremagic.com/issues/show_bug.cgi?id=1813
author | thomask |
---|---|
date | Thu, 21 Feb 2008 13:39:51 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
1570:43123cf43146 | 1571:b6eb7f46f42c |
---|---|
1 // $HeadURL$ | |
2 // $Date$ | |
3 // $Author$ | |
4 | |
5 // @author@ <llucax@gmail.com> | |
6 // @date@ 2008-02-01 | |
7 // @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=1813 | |
8 // @desc@ [Issue 1813] static function parametrized with alias used with delegate throws an internal compiler error. | |
9 | |
10 // __DSTRESS_ELINE__ 28 | |
11 | |
12 module dstress.nocompile.b.bug_tree_inline_1902_B; | |
13 | |
14 template thunk(alias fn){ | |
15 static void thunk(int* arg){ | |
16 fn(arg); | |
17 } | |
18 } | |
19 | |
20 int main(){ | |
21 int x = 1; | |
22 | |
23 void inner(int* arg){ | |
24 if(!(arg !is &x)){ | |
25 assert(0); | |
26 } | |
27 } | |
28 thunk!(inner)(&x); | |
29 return 0; | |
30 } |