[LL API] Support code fragment analysis

This commit is contained in:
Yan Zhulanow
2023-06-14 21:57:57 +09:00
committed by Space Team
parent 3fb038ffd0
commit 02af189066
32 changed files with 493 additions and 32 deletions
@@ -0,0 +1,6 @@
class Foo {
val a = x
val b = y
}
Foo().b
@@ -0,0 +1,4 @@
fun test() {
val x = 0
<caret>val y = 0
}
@@ -0,0 +1,4 @@
Diagnostics from elements:
for PSI element of type KtNameReferenceExpression at (3,13-14)
UNRESOLVED_REFERENCE text ranges: [(38,39)]
PSI: KtNameReferenceExpression at (3,13-14)
@@ -0,0 +1,5 @@
fun foo(): Pair<Int, Int> {
return x to y
}
foo()
@@ -0,0 +1,6 @@
// WITH_STDLIB
fun test() {
val x = 0
<caret>val y = 0
}
@@ -0,0 +1,4 @@
Diagnostics from elements:
for PSI element of type KtNameReferenceExpression at (2,17-18)
UNRESOLVED_REFERENCE text ranges: [(44,45)]
PSI: KtNameReferenceExpression at (2,17-18)
@@ -0,0 +1,6 @@
fun test() {
val x = 0
<caret>val y = 1
}
fun foo(a: String) {}
@@ -0,0 +1,4 @@
Diagnostics from elements:
for PSI element of type KtNameReferenceExpression at (1,5-6)
ARGUMENT_TYPE_MISMATCH text ranges: [(4,5)]
PSI: KtNameReferenceExpression at (1,5-6)