File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -2032,7 +2032,8 @@ type_assignment: param_identifier '=' data_type
20322032 auto base_name = stack_expr ($1 ).id ();
20332033 stack_expr ($$).set (ID_identifier, base_name);
20342034 stack_expr ($$).set (ID_base_name, base_name);
2035- addswap ($$, ID_type, $3 );
2035+ stack_expr ($$).set (ID_value, type_exprt{stack_type ($3 )});
2036+ stack_expr ($$).type () = typet{ID_type};
20362037
20372038 // add to the scope as a type name
20382039 PARSER.scopes .add_name (base_name, " " , verilog_scopet::TYPEDEF);
Original file line number Diff line number Diff line change @@ -102,7 +102,8 @@ void verilog_typecheckt::collect_symbols(
102102 if (type.id () == ID_type)
103103 {
104104 // much like a typedef
105- auto symbol_type = to_be_elaborated_typet{declarator.type ()};
105+ auto symbol_type =
106+ to_be_elaborated_typet{to_type_expr (declarator.value ()).type ()};
106107
107108 type_symbolt symbol{full_identifier, symbol_type, mode};
108109
You can’t perform that action at this time.
0 commit comments