Alternative proposal to the above based on <@U0356...
# language-proposals
j
Alternative proposal to the above based on @Chris Lee’s point:
Copy code
expect value class ViewNode
actual value class ViewNode(val android: View)  // android
actual value class ViewNode(val web: HTMLElement)  // web
actual value class ViewNode(val ios: UIView)  // ios
To be clear, this doesn't currently work, but it would be nice if it did.
y
Can't you do
expect class
and actualize it with `value class`es?
j
"The following declaration is incompatible because modifiers are different"
😲 1
z
I've worked around this by making something like this
Copy code
expect class Something
expect value class Container(val value: Something)
Copy code
actual typealias Something = Int
actual value class Container(val something: Something)
But it would be a lot neater to not have to use a typealias
j
It still doesn't work in my case because
HTMLElement
is an
external interface