diff ast/Exp.d @ 63:9f8131676242 new_gen

Now Decl's have a DType type(), and should use varType and returnType to get the old type id
author Anders Halager <halager@gmail.com>
date Tue, 29 Apr 2008 15:13:38 +0200
parents 2451f0904bf6
children 932bb3c6b80b
line wrap: on
line diff
--- a/ast/Exp.d	Tue Apr 29 15:00:11 2008 +0200
+++ b/ast/Exp.d	Tue Apr 29 15:13:38 2008 +0200
@@ -55,7 +55,7 @@
     {
         DFunction f = cast(DFunction)exp.type();
         assert(f !is null, "Can only call functions");
-        return f.return_type;
+        return f.returnType;
     }
 
     Exp exp;
@@ -69,7 +69,7 @@
         {
             DFunction func_t = cast(DFunction)exp.type();
             assert(func_t !is null, "Calling on something that isn't a function");
-            if (cast(DStruct)func_t.return_type is null)
+            if (cast(DStruct)func_t.returnType is null)
                 return this;
 
             auto call = cast(Identifier)exp;
@@ -84,9 +84,7 @@
             args ~= this.args;
             auto callExp = new CallExp(exp, args);
             callExp.env = f.env;
-            //        auto ass = new AssignExp(i, callExp);
             var.env = f.env;
-            //        ass.env = f.env;
             auto stmtVar = new DeclStmt(var);
             auto stmtCall = new ExpStmt(callExp);
             Stmt[] stmts;