Don't allow non-ANSI ports for class constructors

Class constructors don't allow for non-ANSI ports. E.g. the following is
not valid.

```
class C;
  function new();
    input int i;
  endfunction
endclass
```

The parser will currently accept this, but otherwise ignore the non-ANSI
port. Modify the parser rules so that this is a syntax error.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
This commit is contained in:
Lars-Peter Clausen 2022-02-26 18:51:07 +01:00
parent 967e3455fe
commit e3bc99dbf3
1 changed files with 1 additions and 1 deletions

View File

@ -892,7 +892,7 @@ class_item /* IEEE1800-2005: A.1.8 */
current_function = pform_push_constructor_scope(@3);
}
'(' tf_port_list_opt ')' ';'
tf_item_list_opt
block_item_decls_opt
statement_or_null_list_opt
K_endfunction endnew_opt
{ current_function->set_ports($6);