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:
parent
999bcb6935
commit
06428f3d11
2
parse.y
2
parse.y
|
|
@ -2738,7 +2738,7 @@ block_item_decl
|
||||||
data_type = new vector_type_t(IVL_VT_LOGIC, false, 0);
|
data_type = new vector_type_t(IVL_VT_LOGIC, false, 0);
|
||||||
FILE_NAME(data_type, @2);
|
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;
|
var_lifetime = LexicalScope::INHERITED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue