Make sure `const var` variables are constant

Commit 3daa2982ac ("Add support for `const` variables") added support for
constant variables, but had a small mistake and did propagate the constant
flag from the parser if the variable is declared with the `var` keyword.
Still allowing to modify those variables. Fix this.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
This commit is contained in:
Lars-Peter Clausen 2023-07-29 12:23:31 -07:00
parent 999bcb6935
commit 06428f3d11
1 changed files with 1 additions and 1 deletions

View File

@ -2738,7 +2738,7 @@ block_item_decl
data_type = new vector_type_t(IVL_VT_LOGIC, false, 0);
FILE_NAME(data_type, @2);
}
pform_make_var(@2, $5, data_type, attributes_in_context);
pform_make_var(@2, $5, data_type, attributes_in_context, $1);
var_lifetime = LexicalScope::INHERITED;
}