netstruct_t: Set line info

netstruct_t inherits from LineInfo. But the file and line information is
never set leading to messages like

  :0: error: Member r of packed struct/union must be packed.

When elaborating a netstruct_t set the line info from the struct_type_t it
is elaborated from. This makes sure that error messages for the struct type
have the proper file and line information when printed.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
This commit is contained in:
Lars-Peter Clausen 2022-01-09 19:37:46 +01:00
parent 32f01f87a6
commit ac815a6118
1 changed files with 2 additions and 0 deletions

View File

@ -179,6 +179,8 @@ netstruct_t* struct_type_t::elaborate_type_raw(Design*des, NetScope*scope) const
{
netstruct_t*res = new netstruct_t;
res->set_line(*this);
res->packed(packed_flag);
res->set_signed(signed_flag);