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:
committed by
Dmitry Jemerov
parent
ea6582dd7d
commit
a36e8c86f1
+8
@@ -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() }
|
||||
}
|
||||
+12
@@ -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() }
|
||||
}
|
||||
Reference in New Issue
Block a user