FIR (raw / resolution API): set correctly elvis/bang-bang bound PSIs

This commit is contained in:
Mikhail Glukhikh
2019-07-30 12:02:40 +03:00
parent 1f771a2407
commit 14e9404afd
6 changed files with 45 additions and 7 deletions
+3
View File
@@ -0,0 +1,3 @@
{
"mainFile": "main.kt"
}
+7
View File
@@ -0,0 +1,7 @@
package elvis
class WithElvis(val value: String?) {
fun foo() = <caret>value ?: ""
}
+22
View File
@@ -0,0 +1,22 @@
FILE: main.kt
public final class WithElvis : R|kotlin/Any| {
public constructor(value: R|kotlin/String?|): R|elvis/WithElvis| {
super<R|kotlin/Any|>()
}
public final val value: R|kotlin/String?| = R|<local>/value|
public get(): R|kotlin/String?|
public final fun foo(): R|kotlin/String| {
^foo when (lval <elvis>: R|kotlin/String?| = R|elvis/WithElvis.value|) {
==($subj$, Null(null)) -> {
String()
}
else -> {
R|<local>/<elvis>|!
}
}
}
}
+1
View File
@@ -0,0 +1 @@
R|elvis/WithElvis.value|