Create from usage: Added tests.
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
// "Create method 'component3' from usage" "true"
|
||||
class Foo<T> {
|
||||
fun component1(): Int { return 0 }
|
||||
fun component2(): Int { return 0 }
|
||||
fun component3(): Any {
|
||||
throw Exception("not implemented") //To change body of created methods use File | Settings | File Templates.
|
||||
}
|
||||
}
|
||||
fun foo() {
|
||||
val (a, b, c) = Foo<Int>()
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
// "Create method 'component3' from usage" "true"
|
||||
class Foo<T> {
|
||||
fun component1(): Int { return 0 }
|
||||
fun component2(): Int { return 0 }
|
||||
fun component3(): String {
|
||||
throw Exception("not implemented") //To change body of created methods use File | Settings | File Templates.
|
||||
}
|
||||
}
|
||||
fun foo() {
|
||||
val (a, b, c: String) = Foo<Int>()
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
// "Create method 'component3' from usage" "true"
|
||||
class Foo<T> {
|
||||
fun component1(): Int { return 0 }
|
||||
fun component2(): Int { return 0 }
|
||||
}
|
||||
fun foo() {
|
||||
val (a, b, c) = Foo<caret><Int>()
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
// "Create method 'component3' from usage" "true"
|
||||
class Foo<T> {
|
||||
fun component1(): Int { return 0 }
|
||||
fun component2(): Int { return 0 }
|
||||
}
|
||||
fun foo() {
|
||||
val (a, b, c: String) = Foo<caret><Int>()
|
||||
}
|
||||
Reference in New Issue
Block a user