我有以下课程:
class FooClass<A,B>: NSObject {
func foo(a: A, b: B) { }
}
class BarClass: FooClass<Int, Bool> {
override func foo(a: A, b: B) { } //AUTO-COMPLETE'S PREVIEW SHOWS THIS, BUT COMPILER COMPLAINS "USE OF UNDECLARED TYPE 'A'"
override func foo(a: Int, b: Bool) { } //AUTO-COMPLETE'S PREVIEW DOESN'T SHOW THIS, BUT COMPILER APPROVES
}
自动完成预览显示错误的预览,因为编译器并不喜欢它。我是否错误地声明了我的某个课程,或者是否需要修复自动完成课程?