Add fine check of type inference when adding <> in completion
Add check if type inferred via type parameter of upper bound of extension receiver or value argument #KT-16161 fixed
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
class Cn<T>
|
||||
|
||||
fun <T, C: Cn<T>> C.some(arg: (T) -> Unit): C {
|
||||
return this
|
||||
}
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
val x = Cn<String>()
|
||||
x.<caret>
|
||||
}
|
||||
|
||||
//ELEMENT: some
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
class Cn<T>
|
||||
|
||||
fun <T, C: Cn<T>> C.some(arg: (T) -> Unit): C {
|
||||
return this
|
||||
}
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
val x = Cn<String>()
|
||||
x.some { }
|
||||
}
|
||||
|
||||
//ELEMENT: some
|
||||
Reference in New Issue
Block a user