Huh I have a strange problem with Expect/Actual. I...
# multiplatform
k
Huh I have a strange problem with Expect/Actual. In my common module I have:
Copy code
expect class Test2
class SomeDependencyInjector(val test2: Test2)
In my JS module I have
Copy code
actual typealias Test2 = Document
main(args: Array<String>) {
    val injector = SomeDependencyInjector(document)
}
This gives an error saying document is not of type
Test2
and I can’t cast it because I can only cast it to
Test2 /*Document */
Oh hmmm it compiles just fine, but the IDEA flags it as an error.