Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions regression/verilog/class/new1.desc
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
KNOWNBUG
CORE
new1.sv

^EXIT=0$
^EXIT=10$
^SIGNAL=0$
--
--
The class is not yet recognized as a type.
9 changes: 9 additions & 0 deletions src/verilog/verilog_typecheck_expr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,15 @@ void verilog_typecheck_exprt::assignment_conversion(
}
}

if(rhs.type().id() == ID_verilog_new)
{
if(lhs_type.id() == ID_verilog_class_type)
{
rhs = typecast_exprt{rhs, lhs_type};
return;
}
}

// "The size of the left-hand side of an assignment forms
// the context for the right-hand expression."

Expand Down
Loading