Quick-Fixes: Support "Change function return type" quick-fix for non-local returns

#KT-6910 Fixed
This commit is contained in:
Alexey Sedunov
2015-03-13 18:46:35 +03:00
parent 842eaa86a4
commit f5107be315
7 changed files with 51 additions and 3 deletions
@@ -0,0 +1,6 @@
// "Change 'foo' function return type to 'Int'" "true"
fun foo(n: Int): Int {
n.let {
return 1
}
}
@@ -0,0 +1,6 @@
// "Change 'foo' function return type to 'Int'" "true"
fun foo(n: Int): Int {
n.let {
return@foo 1
}
}
@@ -0,0 +1,6 @@
// "Change 'foo' function return type to 'Int'" "true"
fun foo(n: Int): Boolean {
n.let {
return <caret>1
}
}
@@ -0,0 +1,6 @@
// "Change 'foo' function return type to 'Int'" "true"
fun foo(n: Int): Boolean {
n.let {
return@foo <caret>1
}
}