Create from usage: Do not generate function body if it's declared as a trait member
#KT-6078 Fixed
This commit is contained in:
+11
@@ -0,0 +1,11 @@
|
||||
// "Create extension function 'foo'" "true"
|
||||
|
||||
trait T
|
||||
|
||||
fun test(t: T) {
|
||||
val b: Boolean = t.foo("1", 2)
|
||||
}
|
||||
|
||||
fun T.foo(s: String, i: Int): Boolean {
|
||||
throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates.
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
// "Create function 'foo'" "true"
|
||||
|
||||
trait T {
|
||||
fun foo(s: String, i: Int): Boolean
|
||||
}
|
||||
|
||||
fun test(t: T) {
|
||||
val b: Boolean = t.foo("1", 2)
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
// "Create extension function 'foo'" "true"
|
||||
|
||||
trait T
|
||||
|
||||
fun test(t: T) {
|
||||
val b: Boolean = t.<caret>foo("1", 2)
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
// "Create function 'foo'" "true"
|
||||
|
||||
trait T
|
||||
|
||||
fun test(t: T) {
|
||||
val b: Boolean = t.<caret>foo("1", 2)
|
||||
}
|
||||
Reference in New Issue
Block a user