mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Merge pull request #59141 from hamishknight/wrapping-paper
[AST] Remove ParenType
This commit is contained in:
@@ -587,10 +587,9 @@ Expected<Pattern *> ModuleFile::readPattern(DeclContext *owningDC) {
|
||||
auto result = ParenPattern::createImplicit(getContext(), subPattern);
|
||||
|
||||
if (Type interfaceType = subPattern->getDelayedInterfaceType())
|
||||
result->setDelayedInterfaceType(ParenType::get(getContext(),
|
||||
interfaceType), owningDC);
|
||||
result->setDelayedInterfaceType(interfaceType, owningDC);
|
||||
else
|
||||
result->setType(ParenType::get(getContext(), subPattern->getType()));
|
||||
result->setType(subPattern->getType());
|
||||
restoreOffset.reset();
|
||||
return result;
|
||||
}
|
||||
@@ -6974,19 +6973,6 @@ Expected<Type> DESERIALIZE_TYPE(NOMINAL_TYPE)(
|
||||
return NominalType::get(nominal, parentTy.get(), MF.getContext());
|
||||
}
|
||||
|
||||
Expected<Type> DESERIALIZE_TYPE(PAREN_TYPE)(ModuleFile &MF,
|
||||
SmallVectorImpl<uint64_t> &scratch,
|
||||
StringRef blobData) {
|
||||
TypeID underlyingID;
|
||||
decls_block::ParenTypeLayout::readRecord(scratch, underlyingID);
|
||||
|
||||
auto underlyingTy = MF.getTypeChecked(underlyingID);
|
||||
if (!underlyingTy)
|
||||
return underlyingTy.takeError();
|
||||
|
||||
return ParenType::get(MF.getContext(), underlyingTy.get());
|
||||
}
|
||||
|
||||
Expected<Type> DESERIALIZE_TYPE(TUPLE_TYPE)(ModuleFile &MF,
|
||||
SmallVectorImpl<uint64_t> &scratch,
|
||||
StringRef blobData) {
|
||||
|
||||
Reference in New Issue
Block a user