diff sema/Visitor.d @ 37:858b9805843d new_gen

Bug-fixes Void can now be used and is recognized as a keyword by lexer Fixed a problem with casting on pointer types The expression is now optional for a ReturnStmt (only legal in void funcs)
author Anders Halager <halager@gmail.com>
date Sun, 20 Apr 2008 23:53:05 +0200
parents ce17bea8e9bd
children 495188f9078e
line wrap: on
line diff
--- a/sema/Visitor.d	Sun Apr 20 22:39:07 2008 +0200
+++ b/sema/Visitor.d	Sun Apr 20 23:53:05 2008 +0200
@@ -126,7 +126,8 @@
     // Statements:
     StmtT visitReturnStmt(ReturnStmt s)
     {
-        visitExp(s.exp);
+        if (s.exp)
+            visitExp(s.exp);
         static if (is(StmtT == void))
             return;
         else