JS: fix inlining of callable references
This commit is contained in:
@@ -14,7 +14,7 @@ import utils.*
|
||||
|
||||
// CHECK_CONTAINS_NO_CALLS: test except=imul
|
||||
|
||||
internal fun multiplyBy2(x: Int): Int = x * 2
|
||||
internal inline fun multiplyBy2(x: Int): Int = x * 2
|
||||
|
||||
internal fun test(x: Int): Int = apply(x, ::multiplyBy2)
|
||||
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@ package foo
|
||||
// CHECK_NOT_CALLED_IN_SCOPE: scope=test function=even
|
||||
// CHECK_NOT_CALLED_IN_SCOPE: scope=test function=filter_azvtw4$
|
||||
|
||||
internal fun even(x: Int) = x % 2 == 0
|
||||
internal inline fun even(x: Int) = x % 2 == 0
|
||||
|
||||
internal fun test(a: List<Int>) = a.filter(::even)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user