IR. Change visibility to lowered default function/constructors to public

This commit is contained in:
Mikhael Bogdanov
2019-11-18 10:12:20 +01:00
parent abef5daea9
commit a214d61567
5 changed files with 60 additions and 3 deletions
@@ -0,0 +1,31 @@
// FILE: Foo.kt
package foo
open class Foo() {
protected fun foo(value: Boolean = false) = if (!value) "OK" else "fail5"
}
// FILE: Bar.kt
package bar
import foo.Foo
class Bar() : Foo() {
fun execute(): String {
return object { fun test() = foo() }.test ()
}
}
fun box(): String {
return Bar().execute()
}
// @bar/Bar.class:
// 0 access\$
// 0 INVOKESTATIC foo/Foo.foo\$default
// @bar/Bar$execute$1.class:
// 0 access\$
// 1 INVOKESTATIC foo/Foo.foo\$default