FIR: handle SAM constructor properly in visibility checker

#KT-46074 Fixed
This commit is contained in:
Mikhail Glukhikh
2021-04-14 09:42:53 +03:00
parent d8a2f82cbd
commit 4c13fe5631
3 changed files with 24 additions and 0 deletions
@@ -5,6 +5,12 @@ FILE: kotlinSam.kt
}
public final fun foo(m: R|MyRunnable|): R|kotlin/Unit| {
}
private abstract interface PrivateRunnable : R|kotlin/Any| {
public abstract fun bar(x: R|kotlin/String|): R|kotlin/Boolean|
}
private final fun bar(pr: R|PrivateRunnable|): R|kotlin/Unit| {
}
public final fun main(): R|kotlin/Unit| {
R|/foo|(R|/MyRunnable|(<L> = MyRunnable@fun <anonymous>(x: R|kotlin/Int|): R|kotlin/Boolean| <inline=NoInline> {
^ CMP(>, R|<local>/x|.R|kotlin/Int.compareTo|(Int(1)))
@@ -19,4 +25,8 @@ FILE: kotlinSam.kt
}
R|/foo|(R|/MyRunnable|(R|<local>/x|))
R|/bar|(R|/PrivateRunnable|(<L> = PrivateRunnable@fun <anonymous>(s: R|kotlin/String|): R|kotlin/Boolean| <inline=NoInline> {
^ CMP(>, R|<local>/s|.R|kotlin/String.length|.R|kotlin/Int.compareTo|(Int(0)))
}
))
}