rss
02/15/2024, 1:09 PMtypealias to allow access to companion object
This doesn’t work:
typealias A = B
class B { companion object { fun foo(){} } }
A.foo()
Which is a pity, as it prevents typealias to be used to provide backwards compatibility for renamed or moved classes.
Could Kotlin support access to companion object through the alias?
If not, why?
Thanks for considering.
1 post - 1 participant
Read full topic