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:
parent
967e3455fe
commit
e3bc99dbf3
2
parse.y
2
parse.y
|
|
@ -892,7 +892,7 @@ class_item /* IEEE1800-2005: A.1.8 */
|
||||||
current_function = pform_push_constructor_scope(@3);
|
current_function = pform_push_constructor_scope(@3);
|
||||||
}
|
}
|
||||||
'(' tf_port_list_opt ')' ';'
|
'(' tf_port_list_opt ')' ';'
|
||||||
tf_item_list_opt
|
block_item_decls_opt
|
||||||
statement_or_null_list_opt
|
statement_or_null_list_opt
|
||||||
K_endfunction endnew_opt
|
K_endfunction endnew_opt
|
||||||
{ current_function->set_ports($6);
|
{ current_function->set_ports($6);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue