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:
Lars-Peter Clausen 2022-04-08 10:46:16 +02:00
parent 156f08a1c5
commit 2f38adaeff
1 changed files with 10 additions and 0 deletions

View File

@ -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") {