Create from Usage: Suggest "Create function/secondary constructor" quick fix on argument type mismatch
#KT-11864 Fixed (cherry picked from commit 1912783)
This commit is contained in:
+6
@@ -0,0 +1,6 @@
|
||||
// "Create function 'foo'" "true"
|
||||
fun foo(n: Int) {}
|
||||
|
||||
fun test() {
|
||||
foo("a<caret>bc")
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
// "Create function 'foo'" "true"
|
||||
fun foo(n: Int) {}
|
||||
|
||||
fun test() {
|
||||
foo("abc")
|
||||
}
|
||||
|
||||
fun foo(n: String) {
|
||||
throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates.
|
||||
}
|
||||
Reference in New Issue
Block a user