Mercurial > projects > dang
comparison tests/parser/function_pointer.d @ 187:08b6ce45b456
Changed the way static arrays are represented
Now uses [3 x i32] rather than [3 x i32]*, and when using constants they are
copied before use.
Also dixed a test or two
author | Anders Halager <halager@gmail.com> |
---|---|
date | Fri, 25 Jul 2008 12:53:58 +0200 |
parents | 2a1a635bd531 |
children |
comparison
equal
deleted
inserted
replaced
186:e1e170c2cd44 | 187:08b6ce45b456 |
---|---|
1 | 1 |
2 int main() | 2 int main() |
3 { | 3 { |
4 f = &&foo; | 4 g = &foo; |
5 f = &g; | |
6 return g(2); | |
5 } | 7 } |
6 | 8 |
7 int foo(int x) | 9 int foo(int x) |
8 { | 10 { |
9 return x; | 11 return x; |
10 } | 12 } |
11 | 13 |
12 int function(int x)* f; | 14 int function(int x)* f; |
15 int function(int x) g; |