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 e7ee839 commit 3e46063Copy full SHA for 3e46063
lib/AST/ASTPrinter.cpp
@@ -81,6 +81,11 @@ const std::function<bool(const ExtensionDecl *)>
81
void PrintOptions::setBaseType(Type T) {
82
if (T->is<ErrorType>())
83
return;
84
+ if (auto DynamicSelf = T->getAs<DynamicSelfType>()) {
85
+ // TypeTransformContext requires `T` to have members. Look through dynamic
86
+ // Self.
87
+ T = DynamicSelf->getSelfType();
88
+ }
89
TransformContext = TypeTransformContext(T);
90
}
91
test/SourceKit/CursorInfo/dynamic_self.swift
@@ -0,0 +1,7 @@
1
+class UserCollection {
2
+ static let staticMember = "ABC"
3
+ func test() {
4
+ // RUN: %sourcekitd-test -req=cursor -pos=%(line + 1):10 %s -- %s
5
+ Self.staticMember
6
7
+}
0 commit comments