<@U0QKGKMKN>: ``` import mypackage.Foo.* sealed...
# announcements
m
@uhe:
Copy code
import mypackage.Foo.*

sealed class Foo {
    class Bar(val x: Int) : Foo()
}

fun test() {
    val foo = Bar(5)
    
    when (foo) {
        is Bar -> println(foo.x)
    }
}