Reserve yield if it isn't function call.

This commit is contained in:
Stanislav Erokhin
2017-02-10 20:21:52 +03:00
parent 9eae929084
commit 3efda0e45a
24 changed files with 466 additions and 3 deletions
@@ -0,0 +1,6 @@
// "Migrate unsupported yield syntax" "true"
object yield {}
fun test() {
val foo = yie<caret>ld
}
@@ -0,0 +1,6 @@
// "Migrate unsupported yield syntax" "true"
object yield {}
fun test() {
val foo = `yield`
}
@@ -0,0 +1,8 @@
// "Migrate unsupported yield syntax" "true"
object yield {
operator fun invoke(f: () -> Unit) = f()
}
fun test() {
yie<caret>ld { }
}
@@ -0,0 +1,8 @@
// "Migrate unsupported yield syntax" "true"
object yield {
operator fun invoke(f: () -> Unit) = f()
}
fun test() {
yield() { }
}