[LL FIR] FileStructure: add tests for re-analyzable elements without names
^KT-60132 ^KT-59687
This commit is contained in:
Vendored
+7
@@ -0,0 +1,7 @@
|
||||
class A {
|
||||
fun <caret>() {
|
||||
val a = doSmth("str")
|
||||
}
|
||||
}
|
||||
|
||||
fun doSmth(i: String) = 4
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
IN-BLOCK MODIFICATION IS NOT APPLICABLE FOR THIS KtNamedFunction DECLARATION
|
||||
Vendored
+5
@@ -0,0 +1,5 @@
|
||||
class A {
|
||||
fun <caret>(): Int = doSmth("str")
|
||||
}
|
||||
|
||||
fun doSmth(i: String) = 4
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
IN-BLOCK MODIFICATION IS NOT APPLICABLE FOR THIS KtNamedFunction DECLARATION
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
class A {
|
||||
fun <caret>() = doSmth("str")
|
||||
}
|
||||
|
||||
fun doSmth(i: String) = 4
|
||||
+1
@@ -0,0 +1 @@
|
||||
IN-BLOCK MODIFICATION IS NOT APPLICABLE FOR THIS KtNamedFunction DECLARATION
|
||||
+14
@@ -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
|
||||
}
|
||||
+1
@@ -0,0 +1 @@
|
||||
IN-BLOCK MODIFICATION IS NOT APPLICABLE FOR THIS KtPropertyAccessor DECLARATION
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
class A {
|
||||
val : Int ge<caret>t() = doSmth("str")
|
||||
}
|
||||
|
||||
fun doSmth(i: String) = 4
|
||||
+1
@@ -0,0 +1 @@
|
||||
IN-BLOCK MODIFICATION IS NOT APPLICABLE FOR THIS KtPropertyAccessor DECLARATION
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
class A {
|
||||
val <caret>: Int by lazy {
|
||||
fun doSmth(i: String) = 4
|
||||
doSmth("str")
|
||||
}
|
||||
}
|
||||
+1
@@ -0,0 +1 @@
|
||||
IN-BLOCK MODIFICATION IS NOT APPLICABLE FOR THIS KtProperty DECLARATION
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
class A {
|
||||
val <caret>: Int = run {
|
||||
fun doSmth(i: String) = 4
|
||||
doSmth("str")
|
||||
}
|
||||
}
|
||||
+1
@@ -0,0 +1 @@
|
||||
IN-BLOCK MODIFICATION IS NOT APPLICABLE FOR THIS KtProperty DECLARATION
|
||||
Vendored
+8
@@ -0,0 +1,8 @@
|
||||
class A {
|
||||
var : Int = 1
|
||||
se<caret>t(value) {
|
||||
doSmth(value)
|
||||
}
|
||||
}
|
||||
|
||||
fun doSmth(i: String) = 4
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
IN-BLOCK MODIFICATION IS NOT APPLICABLE FOR THIS KtPropertyAccessor DECLARATION
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
class A {
|
||||
var : Int = 1
|
||||
se<caret>t(value) = doSmth(value)
|
||||
}
|
||||
|
||||
fun doSmth(i: String) = 4
|
||||
+1
@@ -0,0 +1 @@
|
||||
IN-BLOCK MODIFICATION IS NOT APPLICABLE FOR THIS KtPropertyAccessor DECLARATION
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
fun <caret>() {
|
||||
val a = doSmth("str")
|
||||
}
|
||||
|
||||
fun doSmth(i: String) = 4
|
||||
+1
@@ -0,0 +1 @@
|
||||
IN-BLOCK MODIFICATION IS NOT APPLICABLE FOR THIS KtNamedFunction DECLARATION
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
fun <caret>(): Int = doSmth("str")
|
||||
|
||||
fun doSmth(i: String) = 4
|
||||
+1
@@ -0,0 +1 @@
|
||||
IN-BLOCK MODIFICATION IS NOT APPLICABLE FOR THIS KtNamedFunction DECLARATION
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
fun <caret>() = doSmth("str")
|
||||
|
||||
fun doSmth(i: String) = 4
|
||||
+1
@@ -0,0 +1 @@
|
||||
IN-BLOCK MODIFICATION IS NOT APPLICABLE FOR THIS KtNamedFunction DECLARATION
|
||||
analysis/low-level-api-fir/testdata/inBlockModification/topLevelGetterWithTypeWithBodyWithoutName.kt
Vendored
+5
@@ -0,0 +1,5 @@
|
||||
val : Int
|
||||
ge<caret>t() {
|
||||
fun doSmth(i: String) = 4
|
||||
return doSmth("str")
|
||||
}
|
||||
+1
@@ -0,0 +1 @@
|
||||
IN-BLOCK MODIFICATION IS NOT APPLICABLE FOR THIS KtPropertyAccessor DECLARATION
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
val : Int g<caret>et() = doSmth("str")
|
||||
|
||||
fun doSmth(i: String) = 4
|
||||
+1
@@ -0,0 +1 @@
|
||||
IN-BLOCK MODIFICATION IS NOT APPLICABLE FOR THIS KtPropertyAccessor DECLARATION
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
val <caret>: Int by lazy {
|
||||
fun doSmth(i: String) = 4
|
||||
doSmth("str")
|
||||
}
|
||||
+1
@@ -0,0 +1 @@
|
||||
IN-BLOCK MODIFICATION IS NOT APPLICABLE FOR THIS KtProperty DECLARATION
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
val <caret>: Int = doSmth("str")
|
||||
|
||||
fun doSmth(i: String) = 4
|
||||
+1
@@ -0,0 +1 @@
|
||||
IN-BLOCK MODIFICATION IS NOT APPLICABLE FOR THIS KtProperty DECLARATION
|
||||
analysis/low-level-api-fir/testdata/inBlockModification/topLevelSetterWithTypeWithBodyWithoutName.kt
Vendored
+6
@@ -0,0 +1,6 @@
|
||||
var : Int = 1
|
||||
se<caret>t(value) {
|
||||
doSmth(value)
|
||||
}
|
||||
|
||||
fun doSmth(i: String): Unit = 4
|
||||
+1
@@ -0,0 +1 @@
|
||||
IN-BLOCK MODIFICATION IS NOT APPLICABLE FOR THIS KtPropertyAccessor DECLARATION
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
var : Int = 1
|
||||
se<caret>t(value) = doSmth(value)
|
||||
|
||||
fun doSmth(i: String): Unit = 4
|
||||
+1
@@ -0,0 +1 @@
|
||||
IN-BLOCK MODIFICATION IS NOT APPLICABLE FOR THIS KtPropertyAccessor DECLARATION
|
||||
Reference in New Issue
Block a user