Minor. Adjust JS test to protected visibility changes
This commit is contained in:
@@ -3,7 +3,7 @@ package foo
|
|||||||
// CHECK_CONTAINS_NO_CALLS: test1
|
// CHECK_CONTAINS_NO_CALLS: test1
|
||||||
// CHECK_CONTAINS_NO_CALLS: test2
|
// CHECK_CONTAINS_NO_CALLS: test2
|
||||||
// CHECK_CONTAINS_NO_CALLS: test3
|
// CHECK_CONTAINS_NO_CALLS: test3
|
||||||
// CHECK_CONTAINS_NO_CALLS: test4
|
// CHECK_CONTAINS_NO_CALLS: test4_buocd8$
|
||||||
// CHECK_CONTAINS_NO_CALLS: test5
|
// CHECK_CONTAINS_NO_CALLS: test5
|
||||||
// CHECK_HAS_INLINE_METADATA: apply_hiyix$
|
// CHECK_HAS_INLINE_METADATA: apply_hiyix$
|
||||||
// CHECK_HAS_INLINE_METADATA: applyL_hiyix$
|
// CHECK_HAS_INLINE_METADATA: applyL_hiyix$
|
||||||
@@ -17,6 +17,7 @@ public fun <T> apply(arg: T, func: (T)->T): T = func(arg)
|
|||||||
public open class L {
|
public open class L {
|
||||||
inline
|
inline
|
||||||
protected fun <T> applyL(arg: T, func: (T)->T): T = func(arg)
|
protected fun <T> applyL(arg: T, func: (T)->T): T = func(arg)
|
||||||
|
fun test4(l: L, x: Int, y: Int): Int = l.applyL(x) { it * y }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class M {
|
public class M {
|
||||||
@@ -42,10 +43,6 @@ internal fun test2(m: M, x: Int, y: Int): Int = m.applyM(x) { it * y }
|
|||||||
|
|
||||||
internal fun test3(n: N, x: Int, y: Int): Int = n.applyN(x) { it * y }
|
internal fun test3(n: N, x: Int, y: Int): Int = n.applyN(x) { it * y }
|
||||||
|
|
||||||
internal object LTest : L() {
|
|
||||||
fun test4(l: L, x: Int, y: Int): Int = l.applyL(x) { it * y }
|
|
||||||
}
|
|
||||||
|
|
||||||
internal fun test5(x: Int, y: Int): Int = O.OInner.applyO(x) { it * y }
|
internal fun test5(x: Int, y: Int): Int = O.OInner.applyO(x) { it * y }
|
||||||
|
|
||||||
fun box(): String {
|
fun box(): String {
|
||||||
@@ -58,8 +55,8 @@ fun box(): String {
|
|||||||
assertEquals(6, test3(N(), 2, 3))
|
assertEquals(6, test3(N(), 2, 3))
|
||||||
assertEquals(20, test3(N(), 5, 4))
|
assertEquals(20, test3(N(), 5, 4))
|
||||||
|
|
||||||
assertEquals(6, LTest.test4(L(), 2, 3))
|
assertEquals(6, L().test4(L(), 2, 3))
|
||||||
assertEquals(20, LTest.test4(L(), 5, 4))
|
assertEquals(20, L().test4(L(), 5, 4))
|
||||||
|
|
||||||
assertEquals(6, test5(2, 3))
|
assertEquals(6, test5(2, 3))
|
||||||
assertEquals(20, test5(5, 4))
|
assertEquals(20, test5(5, 4))
|
||||||
|
|||||||
Reference in New Issue
Block a user