I have an expect class as such: ``` internal expec...
# multiplatform
s
I have an expect class as such:
Copy code
internal expect class WeakReference<T>(reference: T) {
    fun get(): T?
}
I want to define an
actual typealias
on
kotlin.native.ref.WeakReference
for the linuxx64 source set. When I declare it as such, the compiler complains that `visibility is different`:
Copy code
internal actual typealias WeakReference<T> = kotlin.native.ref.WeakReference<T>
When I remove
internal
, the compiler still complains that
visibility is different
. Should I report this?
s
Have you tried removing
internal
from both
expect
and
actual
?
s
I'll try that and get back to you. I didn't try it because I assumed it would compile correctly
Yep, no errors show when I remove
internal
from both
expect
and
actual
. It's only when they're both
internal
that the error manifests. @svyatoslav.scherbina
s
This is expected behaviour.