shithub: mc

Download patch

ref: fe2828953f8d6ee39675e921d28d48a9e9cb442e
parent: 1a9d4b863e4d94c483339e5ef4874119edd51f46
author: Ori Bernstein <ori@eigenstate.org>
date: Mon Jan 9 17:40:30 EST 2012

Alloc the return type for functions

--- a/parse/gram.y
+++ b/parse/gram.y
@@ -463,7 +463,7 @@
         ;
 
 funclit : TObrace params TEndln blockbody TCbrace
-            {$$ = mkfunc($1->line, $2.nl, $2.nn, NULL, $4);}
+            {$$ = mkfunc($1->line, $2.nl, $2.nn, mktyvar($3->line), $4);}
         | TObrace params TRet type TEndln blockbody TCbrace
             {$$ = mkfunc($1->line, $2.nl, $2.nn, $4, $6);}
         ;