I have something like: `// commonMain/File 1 Ever...
# multiplatform
c
I have something like:
Copy code
// 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
Copy code
@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.
b
Please file an issue at https://kotl.in/issue