当在其他编译单元 A 中引用类型 T 时,我希望能够检测到类型 T 的完整类型名称。所以说 A 是
package p
import com.p1.A
import com.p2._
class X {
def method1:A // detect it as com.p1.A, which I can do because of the import
def method2:B // detect it as com.p2.B, which I can't at the moment
}
我觉得 scalameta 可能不是类型检测的最佳工具,是否有一种安全/简单的方法来检测所有类型?