Skip to content

Commit e16ace6

Browse files
committed
gccrs: Add IdentifierPattern subpattern support for ClosureParamInfer
gcc/rust/ChangeLog: * typecheck/rust-hir-type-check-pattern.cc(ClosureParamInfer(IdentifierPattern)): Resolve subpattern types for IdentifierPattern. Signed-off-by: Yap Zhi Heng <[email protected]>
1 parent 07852cb commit e16ace6

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

gcc/rust/typecheck/rust-hir-type-check-pattern.cc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -814,6 +814,11 @@ ClosureParamInfer::visit (HIR::WildcardPattern &pattern)
814814
void
815815
ClosureParamInfer::visit (HIR::IdentifierPattern &pattern)
816816
{
817+
if (pattern.has_subpattern ())
818+
{
819+
ClosureParamInfer::Resolve (pattern.get_subpattern ());
820+
}
821+
817822
HirId id = pattern.get_mappings ().get_hirid ();
818823
infered = new TyTy::InferType (id, TyTy::InferType::InferTypeKind::GENERAL,
819824
TyTy::InferType::TypeHint::Default (),

0 commit comments

Comments
 (0)