You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[CodeCompletion] Stop suggesting initializer calls on unresolved member
For example, for
class C {
class D: C {
init() {}
}
}
let _: C = .#^HERE^#
We used to suggest 'D()' (not just 'D') because it was invalid without
initialization. However, after SE-0287, it can be valid. For example, if
'D' has:
extension C.D {
static var staticC: C { ... }
}
Users can write:
let _: C = .D.staticC
So we should not suggest constructor calls. Also, this is consistent with
normal type name completion. Users still can get initializer completions
by adding '(' after the type name.
Although initialization call completion with type names was convenient
in some cases, it's too annoying when we have unrelated member types
like:
enum MyEnum {
typealias Content = Int
case value(Content)
}
We don't want `.Content(bitPattern)` etc for implicit member completion
for 'MyEnum' context type.
rdar://75963052
0 commit comments