diff ast/Exp.d @ 193:658178183018

Added error message for the case of calling a function pointer with wrong parameter count.
author Anders Johnsen <skabet@gmail.com>
date Fri, 25 Jul 2008 15:31:16 +0200
parents fda35d57847e
children 08f68d684047
line wrap: on
line diff
--- a/ast/Exp.d	Fri Jul 25 15:00:54 2008 +0200
+++ b/ast/Exp.d	Fri Jul 25 15:31:16 2008 +0200
@@ -110,6 +110,16 @@
         return f.returnType;
     }
 
+    DType callerType()
+    {
+        DFunction f = new DFunction(new Identifier("function"));
+        f.returnType = type;
+        foreach (a ; args)
+            f.params ~= a.type;
+            
+        return f;
+    }
+
     override CallExp simplify()
     {
         foreach (ref arg; args)