changeset 188:b3e0729c8524

Extra test
author Anders Halager <halager@gmail.com>
date Fri, 25 Jul 2008 12:55:38 +0200
parents 08b6ce45b456
children 75d0544ddc45
files tests/code/function_pointer_3.d
diffstat 1 files changed, 11 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/code/function_pointer_3.d	Fri Jul 25 12:55:38 2008 +0200
@@ -0,0 +1,11 @@
+
+int main()
+{
+    int function(int) f = &foo;
+    return f(3);
+}
+
+int foo(int x)
+{
+    return x*x*x;
+}