Open keith opened 1 year ago
there are a few cases this adds imports for that might be surprising:
// module a
class A {
let property: String
}
// module b
class B: A {}
// module c
self.b.property
A
(AFAIUI):// module a
struct A {}
// module b
typealias B = A
extension B {
func foo() {}
}
// module c
B().foo()
maybe some more, but most were pretty understandable and more surprising that they could be missing (mostly the usual suspects like extensions on system types, operators, uses of callAsFunction
etc)
This works by collecting all definition USRs from all units, and cross referencing all reference USRs from each file, until there are no unhandled USRs remaining.