Tweak handling of invalid function signature for function literal.
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 15 Dec 2010 22:42:30 +0000 (22:42 +0000)
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 15 Dec 2010 22:42:30 +0000 (22:42 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@167879 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/go/gofrontend/parse.cc

index 29ea7e9..a0d87dc 100644 (file)
@@ -2513,10 +2513,7 @@ Parse::function_lit()
 
   Function_type* type = this->signature(NULL, location);
   if (type == NULL)
-    {
-      this->block();
-      return Expression::make_error(location);
-    }
+    type = Type::make_function_type(NULL, NULL, NULL, location);
 
   // For a function literal, the next token must be a '{'.  If we
   // don't see that, then we may have a type expression.