FIR resolution API: fix handling of expressions inside local functions

This commit is contained in:
Mikhail Glukhikh
2019-07-30 10:16:39 +03:00
parent 760fb668bb
commit 2a69efba8a
6 changed files with 55 additions and 11 deletions
+3
View File
@@ -0,0 +1,3 @@
{
"mainFile": "main.kt"
}
+14
View File
@@ -0,0 +1,14 @@
package main
fun main() {
fun foo(): Int {
return <caret>bar()
}
foo()
}
fun bar(): Int {
val x = 4
return 9 * x
}
+12
View File
@@ -0,0 +1,12 @@
FILE: main.kt
public final fun main(): R|kotlin/Unit| {
local final fun foo(): R|kotlin/Int| {
^foo R|main/bar|()
}
R|<local>/foo|()
}
public final fun bar(): R|kotlin/Int| {
lval x: <implicit> = Int(4)
^bar Int(9).times#(x#)
}
+1
View File
@@ -0,0 +1 @@
R|main/bar|()