FIR: handle SAM constructor properly in visibility checker
#KT-46074 Fixed
This commit is contained in:
@@ -4,6 +4,12 @@ fun interface MyRunnable {
|
||||
|
||||
fun foo(m: MyRunnable) {}
|
||||
|
||||
private fun interface PrivateRunnable {
|
||||
fun bar(x: String): Boolean
|
||||
}
|
||||
|
||||
private fun bar(pr: PrivateRunnable) {}
|
||||
|
||||
fun main() {
|
||||
foo(MyRunnable { x ->
|
||||
x > 1
|
||||
@@ -14,4 +20,6 @@ fun main() {
|
||||
val x = { x: Int -> x > 1 }
|
||||
|
||||
foo(MyRunnable(x))
|
||||
|
||||
bar(PrivateRunnable { s -> s.length > 0 })
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user