Files
swift-mirror/test/IDE/complete_init_inherited.swift
Rintaro Ishizaki a08e3e58a7 [Completion] Look through implicit expr when collecting possible callees
For example:
  class Base {
    init(_: Int) {}
    convenience init(_: Int) { self.init() }
  }
  class Derived: Base {
    convenience init(sub: Int) { self.init(sub) }
  }
  Derived(#^HERE^#

In this case, the call is type checked to 'Base.init(_:)' and 'Derived'
is wrapped with 'MetatypeConversionExpr' with type 'Base.Type'. We need
to look through it to get the 'TypeExpr' with 'Derived.Type'.

rdar://74233797
2021-04-28 18:47:08 -07:00

4.7 KiB