Convert to block body intention action
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
// "Convert to block body" "true"
|
||||
fun foo(): String {
|
||||
return "abc"
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
// "Convert to block body" "true"
|
||||
// ERROR: Unresolved reference: bar
|
||||
fun <caret>foo(): String {
|
||||
return bar()
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
// "Convert to block body" "true"
|
||||
// ERROR: Unresolved reference: XXX
|
||||
// ERROR: Unresolved reference: bar
|
||||
fun <caret>foo(): XXX {
|
||||
return bar()
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
// "Convert to block body" "true"
|
||||
fun foo(): Unit {
|
||||
bar()
|
||||
}
|
||||
|
||||
fun bar() { }
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
// "Convert to block body" "true"
|
||||
// ERROR: Unresolved reference: bar
|
||||
fun <caret>foo(): Unit {
|
||||
bar()
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
// "Convert to block body" "true"
|
||||
fun <caret>foo(): String {
|
||||
throw UnsupportedOperationException()
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
// "Convert to block body" "true"
|
||||
val foo: String
|
||||
get() {
|
||||
return "abc"
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
// "Convert to block body" "true"
|
||||
val foo: String
|
||||
get() {
|
||||
throw UnsupportedOperationException()
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
// "Convert to block body" "true"
|
||||
import java.net.URI
|
||||
|
||||
fun foo(): URI {
|
||||
return java.io.File("x").toURI()
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
// "Convert to block body" "true"
|
||||
fun foo() {
|
||||
bar()
|
||||
}
|
||||
|
||||
fun bar() { }
|
||||
@@ -0,0 +1,4 @@
|
||||
// "Convert to block body" "true"
|
||||
fun foo(): Nothing {
|
||||
throw UnsupportedOperationException()
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
// "Convert to block body" "true"
|
||||
var foo: String
|
||||
get() = "abc"
|
||||
set(value) {
|
||||
doSet(value)
|
||||
}
|
||||
|
||||
fun doSet(value: String){}
|
||||
@@ -0,0 +1,2 @@
|
||||
// "Convert to block body" "true"
|
||||
fun <caret>foo(): String = "abc"
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
// "Convert to block body" "true"
|
||||
// ERROR: Unresolved reference: bar
|
||||
fun <caret>foo(): String = bar()
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
// "Convert to block body" "true"
|
||||
// ERROR: Unresolved reference: XXX
|
||||
// ERROR: Unresolved reference: bar
|
||||
fun <caret>foo(): XXX = bar()
|
||||
@@ -0,0 +1,4 @@
|
||||
// "Convert to block body" "true"
|
||||
fun <caret>foo(): Unit = bar()
|
||||
|
||||
fun bar() { }
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
// "Convert to block body" "true"
|
||||
// ERROR: Unresolved reference: bar
|
||||
fun <caret>foo(): Unit = bar()
|
||||
@@ -0,0 +1,2 @@
|
||||
// "Convert to block body" "true"
|
||||
fun <caret>foo(): String = throw UnsupportedOperationException()
|
||||
@@ -0,0 +1,3 @@
|
||||
// "Convert to block body" "true"
|
||||
val foo: String
|
||||
<caret>get() = "abc"
|
||||
@@ -0,0 +1,3 @@
|
||||
// "Convert to block body" "true"
|
||||
val foo: String
|
||||
<caret>get() = throw UnsupportedOperationException()
|
||||
@@ -0,0 +1,2 @@
|
||||
// "Convert to block body" "true"
|
||||
fun <caret>foo() = java.io.File("x").toURI()
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
// "Convert to block body" "false"
|
||||
// ERROR: Unresolved reference: bar
|
||||
fun <caret>foo() = bar()
|
||||
@@ -0,0 +1,4 @@
|
||||
// "Convert to block body" "true"
|
||||
fun <caret>foo() = bar()
|
||||
|
||||
fun bar() { }
|
||||
@@ -0,0 +1,2 @@
|
||||
// "Convert to block body" "true"
|
||||
fun <caret>foo(): Nothing = throw UnsupportedOperationException()
|
||||
@@ -0,0 +1,6 @@
|
||||
// "Convert to block body" "true"
|
||||
var foo: String
|
||||
get() = "abc"
|
||||
<caret>set(value) = doSet(value)
|
||||
|
||||
fun doSet(value: String){}
|
||||
Reference in New Issue
Block a user