From: Owen Avery <powerboat9.ga...@gmail.com>

gcc/rust/ChangeLog:

        * typecheck/rust-hir-type-check-pattern.cc (TypeCheckPattern::visit): 
Add proper
        visitor.

Signed-off-by: Owen Avery <powerboat9.ga...@gmail.com>
---
 gcc/rust/typecheck/rust-hir-type-check-pattern.cc | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/gcc/rust/typecheck/rust-hir-type-check-pattern.cc 
b/gcc/rust/typecheck/rust-hir-type-check-pattern.cc
index b017a851b5d..393f4158003 100644
--- a/gcc/rust/typecheck/rust-hir-type-check-pattern.cc
+++ b/gcc/rust/typecheck/rust-hir-type-check-pattern.cc
@@ -387,10 +387,12 @@ TypeCheckPattern::visit (HIR::IdentifierPattern &)
 }
 
 void
-TypeCheckPattern::visit (HIR::GroupedPattern &)
+TypeCheckPattern::visit (HIR::GroupedPattern &pattern)
 {
-  // TODO
-  gcc_unreachable ();
+  TyTy::BaseType *inner_ty
+    = TypeCheckPattern::Resolve (pattern.get_item ().get (), parent);
+  infered = inner_ty->clone ();
+  infered->set_ref (pattern.get_pattern_mappings ().get_hirid ());
 }
 
 void
-- 
2.40.0

Reply via email to