[LL FIR] FileStructure: add tests for re-analyzable elements without names

^KT-60132
^KT-59687
This commit is contained in:
Dmitrii Gridin
2023-07-05 12:54:51 +02:00
parent e354b2a900
commit 9e88da2e66
43 changed files with 385 additions and 0 deletions
@@ -0,0 +1,7 @@
class A {
fun <caret>() {
val a = doSmth("str")
}
}
fun doSmth(i: String) = 4
@@ -0,0 +1 @@
IN-BLOCK MODIFICATION IS NOT APPLICABLE FOR THIS KtNamedFunction DECLARATION
@@ -0,0 +1,5 @@
class A {
fun <caret>(): Int = doSmth("str")
}
fun doSmth(i: String) = 4
@@ -0,0 +1 @@
IN-BLOCK MODIFICATION IS NOT APPLICABLE FOR THIS KtNamedFunction DECLARATION
@@ -0,0 +1,5 @@
class A {
fun <caret>() = doSmth("str")
}
fun doSmth(i: String) = 4
@@ -0,0 +1 @@
IN-BLOCK MODIFICATION IS NOT APPLICABLE FOR THIS KtNamedFunction DECLARATION
@@ -0,0 +1,14 @@
import kotlin.contracts.contract
class A {
var : Int
ge<caret>t() {
contract {
req
}
fun doSmth(i: String) = 4
return doSmth("str")
}
set(value) = Unit
}
@@ -0,0 +1 @@
IN-BLOCK MODIFICATION IS NOT APPLICABLE FOR THIS KtPropertyAccessor DECLARATION
@@ -0,0 +1,5 @@
class A {
val : Int ge<caret>t() = doSmth("str")
}
fun doSmth(i: String) = 4
@@ -0,0 +1 @@
IN-BLOCK MODIFICATION IS NOT APPLICABLE FOR THIS KtPropertyAccessor DECLARATION
@@ -0,0 +1,6 @@
class A {
val <caret>: Int by lazy {
fun doSmth(i: String) = 4
doSmth("str")
}
}
@@ -0,0 +1 @@
IN-BLOCK MODIFICATION IS NOT APPLICABLE FOR THIS KtProperty DECLARATION
@@ -0,0 +1,6 @@
class A {
val <caret>: Int = run {
fun doSmth(i: String) = 4
doSmth("str")
}
}
@@ -0,0 +1 @@
IN-BLOCK MODIFICATION IS NOT APPLICABLE FOR THIS KtProperty DECLARATION
@@ -0,0 +1,8 @@
class A {
var : Int = 1
se<caret>t(value) {
doSmth(value)
}
}
fun doSmth(i: String) = 4
@@ -0,0 +1 @@
IN-BLOCK MODIFICATION IS NOT APPLICABLE FOR THIS KtPropertyAccessor DECLARATION
@@ -0,0 +1,6 @@
class A {
var : Int = 1
se<caret>t(value) = doSmth(value)
}
fun doSmth(i: String) = 4
@@ -0,0 +1 @@
IN-BLOCK MODIFICATION IS NOT APPLICABLE FOR THIS KtPropertyAccessor DECLARATION
@@ -0,0 +1,5 @@
fun <caret>() {
val a = doSmth("str")
}
fun doSmth(i: String) = 4
@@ -0,0 +1 @@
IN-BLOCK MODIFICATION IS NOT APPLICABLE FOR THIS KtNamedFunction DECLARATION
@@ -0,0 +1,3 @@
fun <caret>(): Int = doSmth("str")
fun doSmth(i: String) = 4
@@ -0,0 +1 @@
IN-BLOCK MODIFICATION IS NOT APPLICABLE FOR THIS KtNamedFunction DECLARATION
@@ -0,0 +1,3 @@
fun <caret>() = doSmth("str")
fun doSmth(i: String) = 4
@@ -0,0 +1 @@
IN-BLOCK MODIFICATION IS NOT APPLICABLE FOR THIS KtNamedFunction DECLARATION
@@ -0,0 +1,5 @@
val : Int
ge<caret>t() {
fun doSmth(i: String) = 4
return doSmth("str")
}
@@ -0,0 +1 @@
IN-BLOCK MODIFICATION IS NOT APPLICABLE FOR THIS KtPropertyAccessor DECLARATION
@@ -0,0 +1,3 @@
val : Int g<caret>et() = doSmth("str")
fun doSmth(i: String) = 4
@@ -0,0 +1 @@
IN-BLOCK MODIFICATION IS NOT APPLICABLE FOR THIS KtPropertyAccessor DECLARATION
@@ -0,0 +1,4 @@
val <caret>: Int by lazy {
fun doSmth(i: String) = 4
doSmth("str")
}
@@ -0,0 +1 @@
IN-BLOCK MODIFICATION IS NOT APPLICABLE FOR THIS KtProperty DECLARATION
@@ -0,0 +1,3 @@
val <caret>: Int = doSmth("str")
fun doSmth(i: String) = 4
@@ -0,0 +1 @@
IN-BLOCK MODIFICATION IS NOT APPLICABLE FOR THIS KtProperty DECLARATION
@@ -0,0 +1,6 @@
var : Int = 1
se<caret>t(value) {
doSmth(value)
}
fun doSmth(i: String): Unit = 4
@@ -0,0 +1 @@
IN-BLOCK MODIFICATION IS NOT APPLICABLE FOR THIS KtPropertyAccessor DECLARATION
@@ -0,0 +1,4 @@
var : Int = 1
se<caret>t(value) = doSmth(value)
fun doSmth(i: String): Unit = 4
@@ -0,0 +1 @@
IN-BLOCK MODIFICATION IS NOT APPLICABLE FOR THIS KtPropertyAccessor DECLARATION