The type of constant item expression was not properly visited in the
default resolver.
gcc/rust/ChangeLog:
* resolve/rust-default-resolver.cc (DefaultResolver::visit): Visit
constant item's types.
Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
void
DefaultResolver::visit (AST::ConstantItem &item)
{
- auto expr_vis = [this, &item] () { item.get_expr ().accept_vis (*this); };
+ auto expr_vis = [this, &item] () {
+ item.get_expr ().accept_vis (*this);
+ visit (item.get_type ());
+ };
// FIXME: Why do we need a Rib here?
ctx.scoped (Rib::Kind::Item, item.get_node_id (), expr_vis);