mirror of
https://gcc.gnu.org/git/gcc.git
synced 2026-02-22 20:01:22 -05:00
gccrs: Add missing name resolution to Function type-path segments
gcc/rust/ChangeLog: * resolve/rust-ast-resolve-type.cc (ResolveRelativeTypePath::go): Add missing handling of function case.
This commit is contained in:
committed by
Arthur Cohen
parent
699e7e8627
commit
12e94515f8
@@ -149,7 +149,20 @@ ResolveRelativeTypePath::go (AST::TypePath &path, NodeId &resolved_node_id)
|
||||
break;
|
||||
|
||||
case AST::TypePathSegment::SegmentType::FUNCTION:
|
||||
gcc_unreachable ();
|
||||
AST::TypePathSegmentFunction *fnseg
|
||||
= static_cast<AST::TypePathSegmentFunction *> (segment.get ());
|
||||
|
||||
AST::TypePathFunction &fn = fnseg->get_type_path_function ();
|
||||
for (auto ¶m : fn.get_params ())
|
||||
{
|
||||
ResolveType::go (param.get ());
|
||||
}
|
||||
|
||||
if (fn.has_return_type ())
|
||||
{
|
||||
ResolveType::go (fn.get_return_type ().get ());
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user