File tree Expand file tree Collapse file tree 2 files changed +18
-3
lines changed
test/SourceKit/CursorInfo Expand file tree Collapse file tree 2 files changed +18
-3
lines changed Original file line number Diff line number Diff line change @@ -801,9 +801,11 @@ AccessLevel Symbol::getEffectiveAccessLevel(const ExtensionDecl *ED) {
801801
802802 AccessLevel maxInheritedAL = AccessLevel::Private;
803803 for (auto Inherited : ED->getInherited ()) {
804- if (const auto *Proto = dyn_cast_or_null<ProtocolDecl>(
805- Inherited.getType ()->getAnyNominal ())) {
806- maxInheritedAL = std::max (maxInheritedAL, Proto->getFormalAccess ());
804+ if (const auto Type = Inherited.getType ()) {
805+ if (const auto *Proto = dyn_cast_or_null<ProtocolDecl>(
806+ Type->getAnyNominal ())) {
807+ maxInheritedAL = std::max (maxInheritedAL, Proto->getFormalAccess ());
808+ }
807809 }
808810 }
809811
Original file line number Diff line number Diff line change 1+ // RUN: %sourcekitd-test -req=cursor -pos=9:28 -req-opts=retrieve_symbol_graph=1 %s -- %s
2+
3+ extension ResourceRecordType {
4+ public var debugDescription : String {
5+ public struct HostRecord < IPType: IP > {
6+ }
7+ extension HostRecord : Hashable {
8+ public struct StartOfAuthorityRecord {
9+ public var a
10+ }
11+ }
12+ }
13+ }
You can’t perform that action at this time.
0 commit comments