[FIR] Approximate integer constants in lhs of callable reference

This commit is contained in:
Dmitriy Novozhilov
2020-04-14 15:57:54 +03:00
parent c71f9d9640
commit f7dc06a772
8 changed files with 40 additions and 4 deletions
@@ -0,0 +1,9 @@
fun Short.foo(): Int = 1
fun Int.foo(): Int = 2
fun testRef(f: () -> Int) {}
fun test() {
// should resolve to Int.foo
testRef(1::foo)
}
@@ -0,0 +1,12 @@
FILE: integerLiteralInLhs.kt
public final fun R|kotlin/Short|.foo(): R|kotlin/Int| {
^foo Int(1)
}
public final fun R|kotlin/Int|.foo(): R|kotlin/Int| {
^foo Int(2)
}
public final fun testRef(f: R|() -> kotlin/Int|): R|kotlin/Unit| {
}
public final fun test(): R|kotlin/Unit| {
R|/testRef|(Int(1)::R|/foo|)
}