KT-22428 Create member function from usage shouldn't present type parameters as options (#1509)

* KT-22428 Create member function from usage shouldn't present type parameters as options

* Reformat & cleanup
This commit is contained in:
Toshiaki Kameyama
2018-02-17 20:09:44 +09:00
committed by Dmitry Jemerov
parent ea6582dd7d
commit a36e8c86f1
4 changed files with 58 additions and 32 deletions
@@ -0,0 +1,8 @@
// "Create member function 'T.bar'" "true"
open class X
fun <T : X> foo(t: T, f: T.() -> Unit = {}) {}
class Text<T : X>(private val t: T) {
fun f() = foo(t) { <caret>bar() }
}
@@ -0,0 +1,12 @@
// "Create member function 'T.bar'" "true"
open class X {
fun bar() {
TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
}
}
fun <T : X> foo(t: T, f: T.() -> Unit = {}) {}
class Text<T : X>(private val t: T) {
fun f() = foo(t) { bar() }
}