From 69d80839a5156202ea3b0704218bde5bc31424fb Mon Sep 17 00:00:00 2001 From: Martin Whitaker Date: Wed, 21 Feb 2018 20:07:13 +0000 Subject: [PATCH] Improved check for missing task/function port direction. --- parse.y | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/parse.y b/parse.y index f68df4098..c55dac843 100644 --- a/parse.y +++ b/parse.y @@ -2133,7 +2133,9 @@ tf_port_item /* IEEE1800-2005: A.2.7 */ : port_direction_opt data_type_or_implicit IDENTIFIER dimensions_opt tf_port_item_expr_opt { vector*tmp; - NetNet::PortType use_port_type = $1==NetNet::PIMPLICIT ? port_declaration_context.port_type : $1; + NetNet::PortType use_port_type = $1; + if ((use_port_type == NetNet::PIMPLICIT) && (gn_system_verilog() || ($2 == 0))) + use_port_type = port_declaration_context.port_type; perm_string name = lex_strings.make($3); list* ilist = list_from_identifier($3);