Report correct queue method return type when call without parenthesis
When calling a queue method without parenthesis it gets elaborated through the PEIdent path. On this path the type, width and signdess are not reported for the method call. This leads to incorrect behavior in contexts where those are important. Correctly report the type, the same as when the method is called with parenthesis. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
This commit is contained in:
parent
156f08a1c5
commit
2f38adaeff
10
elab_expr.cc
10
elab_expr.cc
|
|
@ -3965,6 +3965,16 @@ unsigned PEIdent::test_width_method_(Design*des, NetScope*scope, width_mode_t&)
|
|||
}
|
||||
}
|
||||
|
||||
if (const struct netqueue_t *queue = net->queue_type()) {
|
||||
if (member_name == "pop_back" || member_name == "pop_front") {
|
||||
expr_type_ = queue->element_base_type();
|
||||
expr_width_ = queue->element_width();
|
||||
min_width_ = expr_width_;
|
||||
signed_flag_ = queue->get_signed();
|
||||
return expr_width_;
|
||||
}
|
||||
}
|
||||
|
||||
// Look for the enumeration attributes.
|
||||
if (const netenum_t*netenum = net->enumeration()) {
|
||||
if (member_name == "num") {
|
||||
|
|
|
|||
Loading…
Reference in New Issue