https://kotlinlang.org logo
#announcements
Title
# announcements
h

hannesstruss

10/31/2017, 1:35 PM
I'm trying to access the children of a sealed class via a typealias, but it fails with
Unresolved reference
. Is that generally impossible?
Copy code
sealed class LoginScreenAction {
  object NameEntered : LoginScreenAction()
  object SubmitClicked : LoginScreenAction()
}

private typealias Action = LoginScreenAction

fun main() {
  println("My action is: ${Action.NameEntered}")
}
m

Marc Knaup

10/31/2017, 1:49 PM
Looks like it’s planned for Kotlin 1.3+ https://youtrack.jetbrains.com/issue/KT-15298
h

hannesstruss

10/31/2017, 5:48 PM
Oh, great, thanks!
4 Views