[CS] Delay type resolution of variables for variables in named pattern

This commit is contained in:
Alex Hoppen
2022-07-18 11:47:11 +02:00
parent e14fa7291f
commit eba95bacbd
5 changed files with 30 additions and 3 deletions

View File

@@ -5256,6 +5256,13 @@ void constraints::simplifyLocator(ASTNode &anchor,
continue;
}
case ConstraintLocator::NamedPatternDecl: {
auto pattern = cast<NamedPattern>(anchor.get<Pattern *>());
anchor = pattern->getDecl();
path = path.slice(1);
break;
}
case ConstraintLocator::ImplicitConversion:
break;