From 7e71da5e5e6bb546b1a57d2e69e5647625d6d4c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Grubbstr=C3=B6m=20=28Grubba=29?= <grubba@grubba.org> Date: Thu, 30 Mar 2000 21:39:12 +0200 Subject: [PATCH] Oops, should work for real this time. Rev: src/language.yacc:1.174 --- src/language.yacc | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/src/language.yacc b/src/language.yacc index 3f57b962b2..13eb095a70 100644 --- a/src/language.yacc +++ b/src/language.yacc @@ -188,7 +188,7 @@ /* This is the grammar definition of Pike. */ #include "global.h" -RCSID("$Id: language.yacc,v 1.173 2000/03/30 19:01:38 grubba Exp $"); +RCSID("$Id: language.yacc,v 1.174 2000/03/30 19:39:12 grubba Exp $"); #ifdef HAVE_MEMORY_H #include <memory.h> #endif @@ -1239,13 +1239,18 @@ opt_function_type: '(' { if ($4) { - if (!$3) { - /* FIXME: Should this be a syntax error or not? */ - push_type(T_MIXED); + if ($3) { + push_type(T_MANY); + type_stack_reverse(); + } else { + /* function_type_list ends with a comma, or is empty. + * FIXME: Should this be a syntax error or not? + */ yywarning("Implicit mixed type."); + type_stack_reverse(); + push_type(T_MANY); + push_type(T_MIXED); } - push_type(T_MANY); - type_stack_reverse(); }else{ type_stack_reverse(); push_type(T_MANY); -- GitLab