Skip to content

Commit a3f9586

Browse files
committed
AST: Remove restriction preventing the base of a member reference from being an existential type
1 parent efc3e5f commit a3f9586

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

lib/AST/ASTVerifier.cpp

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1816,15 +1816,6 @@ class Verifier : public ASTWalker {
18161816
abort();
18171817
}
18181818

1819-
// The base of a member reference cannot be an existential type.
1820-
if (E->getBase()->getType()->getWithoutSpecifierType()
1821-
->isAnyExistentialType()) {
1822-
Out << "Member reference into an unopened existential type\n";
1823-
E->dump(Out);
1824-
Out << "\n";
1825-
abort();
1826-
}
1827-
18281819
// The only time the base is allowed to be inout is if we are accessing
18291820
// a computed property or if the base is a protocol or existential.
18301821
if (auto *baseIOT = E->getBase()->getType()->getAs<InOutType>()) {

0 commit comments

Comments
 (0)