Create from Usage: Approximate unresolvable types

#KT-7722 Fixed
(cherry picked from commit 917cd22)
This commit is contained in:
Alexey Sedunov
2016-06-29 13:06:13 +03:00
parent a1e86e8bfa
commit ae06f01c95
10 changed files with 127 additions and 33 deletions
@@ -0,0 +1,8 @@
// "Create extension function 'List<Int>.foo'" "true"
open class A
fun main(args: Array<String>) {
val list = listOf(1, 2, 4, 5)
list.<caret>foo { object : A() {} }
}
@@ -0,0 +1,12 @@
// "Create extension function 'List<Int>.foo'" "true"
open class A
fun main(args: Array<String>) {
val list = listOf(1, 2, 4, 5)
list.foo { object : A() {} }
}
fun <E> List<E>.foo(function: () -> A) {
TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
}
@@ -0,0 +1,10 @@
// "Create extension function 'List<Int>.foo'" "true"
open class A
fun main(args: Array<String>) {
class Local : A()
val list = listOf(1, 2, 4, 5)
list.<caret>foo { Local() }
}
@@ -0,0 +1,14 @@
// "Create extension function 'List<Int>.foo'" "true"
open class A
fun main(args: Array<String>) {
class Local : A()
val list = listOf(1, 2, 4, 5)
list.foo { Local() }
}
fun <E> List<E>.foo(function: () -> A) {
TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
}