We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7985ac0 commit dc27e46Copy full SHA for dc27e46
lib/AST/ASTVerifier.cpp
@@ -1816,6 +1816,15 @@ class Verifier : public ASTWalker {
1816
abort();
1817
}
1818
1819
+ // The base of a member reference cannot be an existential type.
1820
+ if (E->getBase()->getType()->getWithoutSpecifierType()
1821
+ ->isExistentialType()) {
1822
+ Out << "Member reference into an unopened existential type\n";
1823
+ E->dump(Out);
1824
+ Out << "\n";
1825
+ abort();
1826
+ }
1827
+
1828
// The only time the base is allowed to be inout is if we are accessing
1829
// a computed property or if the base is a protocol or existential.
1830
if (auto *baseIOT = E->getBase()->getType()->getAs<InOutType>()) {
0 commit comments