annotate run/b/bug_tree_inline_1902_A.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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1571
b6eb7f46f42c [Issue 1813] static function parametrized with alias used with delegate throws an internal compiler error.
thomask
parents:
diff changeset
1 // $HeadURL$
b6eb7f46f42c [Issue 1813] static function parametrized with alias used with delegate throws an internal compiler error.
thomask
parents:
diff changeset
2 // $Date$
b6eb7f46f42c [Issue 1813] static function parametrized with alias used with delegate throws an internal compiler error.
thomask
parents:
diff changeset
3 // $Author$
b6eb7f46f42c [Issue 1813] static function parametrized with alias used with delegate throws an internal compiler error.
thomask
parents:
diff changeset
4
b6eb7f46f42c [Issue 1813] static function parametrized with alias used with delegate throws an internal compiler error.
thomask
parents:
diff changeset
5 // @author@ <llucax@gmail.com>
b6eb7f46f42c [Issue 1813] static function parametrized with alias used with delegate throws an internal compiler error.
thomask
parents:
diff changeset
6 // @date@ 2008-02-01
b6eb7f46f42c [Issue 1813] static function parametrized with alias used with delegate throws an internal compiler error.
thomask
parents:
diff changeset
7 // @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=1813
b6eb7f46f42c [Issue 1813] static function parametrized with alias used with delegate throws an internal compiler error.
thomask
parents:
diff changeset
8 // @desc@ [Issue 1813] static function parametrized with alias used with delegate throws an internal compiler error.
b6eb7f46f42c [Issue 1813] static function parametrized with alias used with delegate throws an internal compiler error.
thomask
parents:
diff changeset
9
b6eb7f46f42c [Issue 1813] static function parametrized with alias used with delegate throws an internal compiler error.
thomask
parents:
diff changeset
10 module dstress.run.b.bug_tree_inline_1902_A;
b6eb7f46f42c [Issue 1813] static function parametrized with alias used with delegate throws an internal compiler error.
thomask
parents:
diff changeset
11
b6eb7f46f42c [Issue 1813] static function parametrized with alias used with delegate throws an internal compiler error.
thomask
parents:
diff changeset
12 template thunk(alias fn){
b6eb7f46f42c [Issue 1813] static function parametrized with alias used with delegate throws an internal compiler error.
thomask
parents:
diff changeset
13 void thunk(int* arg){
b6eb7f46f42c [Issue 1813] static function parametrized with alias used with delegate throws an internal compiler error.
thomask
parents:
diff changeset
14 fn(arg);
b6eb7f46f42c [Issue 1813] static function parametrized with alias used with delegate throws an internal compiler error.
thomask
parents:
diff changeset
15 }
b6eb7f46f42c [Issue 1813] static function parametrized with alias used with delegate throws an internal compiler error.
thomask
parents:
diff changeset
16 }
b6eb7f46f42c [Issue 1813] static function parametrized with alias used with delegate throws an internal compiler error.
thomask
parents:
diff changeset
17
b6eb7f46f42c [Issue 1813] static function parametrized with alias used with delegate throws an internal compiler error.
thomask
parents:
diff changeset
18 int main(){
b6eb7f46f42c [Issue 1813] static function parametrized with alias used with delegate throws an internal compiler error.
thomask
parents:
diff changeset
19 int x = 1;
b6eb7f46f42c [Issue 1813] static function parametrized with alias used with delegate throws an internal compiler error.
thomask
parents:
diff changeset
20
b6eb7f46f42c [Issue 1813] static function parametrized with alias used with delegate throws an internal compiler error.
thomask
parents:
diff changeset
21 void inner(int* arg){
b6eb7f46f42c [Issue 1813] static function parametrized with alias used with delegate throws an internal compiler error.
thomask
parents:
diff changeset
22 if(!(arg !is &x)){
b6eb7f46f42c [Issue 1813] static function parametrized with alias used with delegate throws an internal compiler error.
thomask
parents:
diff changeset
23 assert(0);
b6eb7f46f42c [Issue 1813] static function parametrized with alias used with delegate throws an internal compiler error.
thomask
parents:
diff changeset
24 }
b6eb7f46f42c [Issue 1813] static function parametrized with alias used with delegate throws an internal compiler error.
thomask
parents:
diff changeset
25 }
b6eb7f46f42c [Issue 1813] static function parametrized with alias used with delegate throws an internal compiler error.
thomask
parents:
diff changeset
26 thunk!(inner)(&x);
b6eb7f46f42c [Issue 1813] static function parametrized with alias used with delegate throws an internal compiler error.
thomask
parents:
diff changeset
27 return 0;
b6eb7f46f42c [Issue 1813] static function parametrized with alias used with delegate throws an internal compiler error.
thomask
parents:
diff changeset
28 }