CLOVIS
03/20/2020, 1:29 PM// commonMain/File 1 Everything is top level
private val a = ...
internal fun b() { do something with a }
public fun c() { call b }
// commonTest/File 2 In a class
@Test
fun testB() { b() }
@Test
fun testC() { c() }
In Kotlin/JVM, both test run fine. In Kotlin/JS, testC
runs fine, but testB
breaks with ReferenceError: a is not defined
.
To me it looks like that means that Kotlin/JS tests are allowed to call internal functions, but if they do, then those functions cannot find private vals they should be able to find otherwise?
Either I misunderstood something, or there might be some buggy behavior involved.bashor
03/25/2020, 1:44 PM