Add regression tests for implicit variable declarations in packages

Check that it is not possible to declare a variable in a package without an
explicit data type for the variable.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
This commit is contained in:
Lars-Peter Clausen 2022-04-09 07:49:39 +02:00
parent 8f6a9c5d3c
commit 35c69366a5
3 changed files with 14 additions and 0 deletions

View File

@ -0,0 +1,6 @@
// Check that it is not possible to declare a variable in a package without an explicit data
// type for the variable.
pacakge P;
x; // This is a syntax error
endpackage

View File

@ -0,0 +1,6 @@
// Check that it is not possible to declare a variable in a package without an explicit data
// type for the variable.
pacakge P;
[3:0] x; // This is a syntax error
endpackage

View File

@ -529,6 +529,8 @@ sv_package2 normal,-g2009 ivltests
sv_package3 normal,-g2009 ivltests
sv_package4 normal,-g2009 ivltests
sv_package5 normal,-g2009 ivltests
sv_package_implicit_var1 CE,-g2009 ivltests
sv_package_implicit_var2 CE,-g2009 ivltests
sv_packed_port1 normal,-g2009 ivltests
sv_packed_port2 normal,-g2009 ivltests
sv_param_port_list normal,-g2009 ivltests