mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Normalize the way paren types are stripped in Sema.
This commit is contained in:
@@ -1487,9 +1487,7 @@ struct ASTNodeBase {};
|
||||
/// Retrieve the ith element type from the resulting tuple type.
|
||||
auto getOuterElementType = [&](unsigned i) -> Type {
|
||||
if (!TT) {
|
||||
if (auto parenTy = dyn_cast<ParenType>(E->getType().getPointer()))
|
||||
return parenTy->getUnderlyingType();
|
||||
return E->getType();
|
||||
return E->getType()->getWithoutParens();
|
||||
}
|
||||
|
||||
return TT->getElementType(i);
|
||||
|
||||
Reference in New Issue
Block a user