would be nice if type aliases were synonymous for ...
# language-proposals
t
would be nice if type aliases were synonymous for their actual type everywhere?
Copy code
typealias WhatUp = Workers.State

data class Workers(val whatItIs: State) {
    sealed class State {
        object Working: State()
        object WastingTime: State()
    }
}

fun askWhatup(group: Workers) {
    when(group.whatItIs) {
        is Workers.State.Working -> println("busy yo.")
        is WhatUp.WastingTime -> println("we good.")
//        error: unresolved reference: WastingTime
//        is WhatUp.WastingTime -> println("we good.")
//                  ^
    }
}
youtrack 5