From b5c9523e4b92923db121922d12f3ad684c93d81e Mon Sep 17 00:00:00 2001 From: Denis Zharkov Date: Wed, 30 Mar 2016 12:01:32 +0300 Subject: [PATCH] Minor. Adjust JS test to protected visibility changes --- .../inline/cases/metadataForPublicFunction.kt | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/js/js.translator/testData/inline/cases/metadataForPublicFunction.kt b/js/js.translator/testData/inline/cases/metadataForPublicFunction.kt index 7d07aa91d59..05b0d4eac91 100644 --- a/js/js.translator/testData/inline/cases/metadataForPublicFunction.kt +++ b/js/js.translator/testData/inline/cases/metadataForPublicFunction.kt @@ -3,7 +3,7 @@ package foo // CHECK_CONTAINS_NO_CALLS: test1 // CHECK_CONTAINS_NO_CALLS: test2 // CHECK_CONTAINS_NO_CALLS: test3 -// CHECK_CONTAINS_NO_CALLS: test4 +// CHECK_CONTAINS_NO_CALLS: test4_buocd8$ // CHECK_CONTAINS_NO_CALLS: test5 // CHECK_HAS_INLINE_METADATA: apply_hiyix$ // CHECK_HAS_INLINE_METADATA: applyL_hiyix$ @@ -17,6 +17,7 @@ public fun apply(arg: T, func: (T)->T): T = func(arg) public open class L { inline protected fun 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 { @@ -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 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 } fun box(): String { @@ -58,8 +55,8 @@ fun box(): String { assertEquals(6, test3(N(), 2, 3)) assertEquals(20, test3(N(), 5, 4)) - assertEquals(6, LTest.test4(L(), 2, 3)) - assertEquals(20, LTest.test4(L(), 5, 4)) + assertEquals(6, L().test4(L(), 2, 3)) + assertEquals(20, L().test4(L(), 5, 4)) assertEquals(6, test5(2, 3)) assertEquals(20, test5(5, 4))