[LL API] Support code fragment analysis
This commit is contained in:
+6
@@ -0,0 +1,6 @@
|
||||
class Foo {
|
||||
val a = x
|
||||
val b = y
|
||||
}
|
||||
|
||||
Foo().b
|
||||
Vendored
+4
@@ -0,0 +1,4 @@
|
||||
fun test() {
|
||||
val x = 0
|
||||
<caret>val y = 0
|
||||
}
|
||||
analysis/analysis-api/testData/components/diagnosticsProvider/codeFragmentDiagnostics/localClass.txt
Vendored
+4
@@ -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)
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
fun foo(): Pair<Int, Int> {
|
||||
return x to y
|
||||
}
|
||||
|
||||
foo()
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
// WITH_STDLIB
|
||||
|
||||
fun test() {
|
||||
val x = 0
|
||||
<caret>val y = 0
|
||||
}
|
||||
+4
@@ -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)
|
||||
+1
@@ -0,0 +1 @@
|
||||
foo(x)
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
fun test() {
|
||||
val x = 0
|
||||
<caret>val y = 1
|
||||
}
|
||||
|
||||
fun foo(a: String) {}
|
||||
+4
@@ -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)
|
||||
Reference in New Issue
Block a user