We have a sealed class hierarchy: ```sealed class...
# multiplatform
d
We have a sealed class hierarchy:
Copy code
sealed class Product { // OK
   sealed class Card : Product() { // OK
     data class CreditCard(...): Card() // Inacessible from swift
  }
}
The problem is that
CreditCard
is not visible from Swift code, while its parents are visible. Is this a known problem? Are there any workarounds?
r
Things that are double-nested like that can come through shallower. You might be able to see it as
Product.CardCreditCard
instead of
Product.Card.CreditCard
.
d
🤔 re-checked, but nothing like this, and nothing similar in the generated
.h
file either...
g
Just fyi, you could define
sealed class
without putting them all in brackets:
Copy code
sealed class Product
sealed class Card : Product()
data class CreditCard(...): Card()
Inheritance is preserved (but the class name is indeed different).
d
yep, that's exactly how we have them and it doesn't work in either case...
g
🤔 looks good on my project, with a sealed->sealed->class
d
OK, good to know, thanks, will keep digging then