mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Strip TypeLoc from EnumElementPattern
This commit is contained in:
@@ -212,8 +212,8 @@ deriveBodyCodingKey_enum_stringValue(AbstractFunctionDecl *strValDecl, void *) {
|
||||
} else {
|
||||
SmallVector<ASTNode, 4> cases;
|
||||
for (auto *elt : elements) {
|
||||
auto *pat = new (C) EnumElementPattern(TypeLoc::withoutLoc(enumType),
|
||||
SourceLoc(), DeclNameLoc(),
|
||||
auto *baseTE = TypeExpr::createImplicit(enumType, C);
|
||||
auto *pat = new (C) EnumElementPattern(baseTE, SourceLoc(), DeclNameLoc(),
|
||||
DeclNameRef(), elt, nullptr);
|
||||
pat->setImplicit();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user