Auto-import: add quickfix for overloaded generic function
#KT-34667 Fixed
This commit is contained in:
+33
@@ -0,0 +1,33 @@
|
||||
// FILE: first.before.kt
|
||||
// "Import" "true"
|
||||
// ERROR: Type inference failed: Not enough information to infer parameter T in fun <T> foo(): Unit<br>Please specify it explicitly.<br>
|
||||
// ACTION: Create type parameter in function 'shade'
|
||||
// COMPILER_ARGUMENTS: -XXLanguage:-NewInference
|
||||
|
||||
package pack_one
|
||||
|
||||
fun <T> foo() {}
|
||||
fun main() {
|
||||
foo<caret>()
|
||||
}
|
||||
|
||||
// FILE: second.kt
|
||||
package pack_one.sub
|
||||
|
||||
fun foo() {}
|
||||
|
||||
// FILE: first.after.kt
|
||||
// "Import" "true"
|
||||
// ERROR: Type inference failed: Not enough information to infer parameter T in fun <T> foo(): Unit<br>Please specify it explicitly.<br>
|
||||
// ACTION: Create type parameter in function 'shade'
|
||||
// COMPILER_ARGUMENTS: -XXLanguage:-NewInference
|
||||
|
||||
package pack_one
|
||||
|
||||
import pack_one.sub.foo
|
||||
|
||||
fun <T> foo() {}
|
||||
fun main() {
|
||||
foo<caret>()
|
||||
}
|
||||
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
// FILE: first.before.kt
|
||||
// "Import" "true"
|
||||
// ERROR: Not enough information to infer type variable T
|
||||
// COMPILER_ARGUMENTS: -XXLanguage:+NewInference
|
||||
|
||||
package pack_one
|
||||
|
||||
fun <T> foo() {}
|
||||
fun main() {
|
||||
foo<caret>()
|
||||
}
|
||||
|
||||
// FILE: second.kt
|
||||
package pack_one.sub
|
||||
|
||||
fun foo() {}
|
||||
|
||||
// FILE: first.after.kt
|
||||
// "Import" "true"
|
||||
// ERROR: Not enough information to infer type variable T
|
||||
// COMPILER_ARGUMENTS: -XXLanguage:+NewInference
|
||||
|
||||
package pack_one
|
||||
|
||||
import pack_one.sub.foo
|
||||
|
||||
fun <T> foo() {}
|
||||
fun main() {
|
||||
foo<caret>()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user