mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[ast] Refactor BindingPattern to take a VarDecl::Introducer directly instead of a bool to mean a let.
I am going to be adding more VarDecl::Introducers so this is a small nice cleanup that is cut off the larger patch.
This commit is contained in:
@@ -1650,7 +1650,8 @@ deriveBodyDecodable_enum_init(AbstractFunctionDecl *initDecl, void *) {
|
||||
C, UnresolvedDotExpr::createImplicit(C, allKeysExpr, C.Id_popFirst));
|
||||
|
||||
auto *theKeyPattern = BindingPattern::createImplicit(
|
||||
C, /*isLet=*/true, NamedPattern::createImplicit(C, theKeyDecl));
|
||||
C, VarDecl::Introducer::Let,
|
||||
NamedPattern::createImplicit(C, theKeyDecl));
|
||||
|
||||
guardElements.emplace_back(SourceLoc(), theKeyPattern,
|
||||
allKeysPopFirstCallExpr);
|
||||
|
||||
Reference in New Issue
Block a user