rednifre
11/15/2022, 10:53 AMJohann Pardanaud
11/15/2022, 11:06 AMwhen
and enforces you to handle all the casesephemient
11/15/2022, 11:13 AMParent::class.sealedSubclasses.map { it.objectInstance }
- there's an open issue to make it available without runtime reflectionephemient
11/15/2022, 11:14 AMwhen
works fine on objects (or any other subtype) of sealed classes and interfacesrednifre
11/15/2022, 11:15 AMephemient
11/15/2022, 11:15 AMephemient
11/15/2022, 11:16 AMJoffrey
11/15/2022, 11:16 AMephemient
11/15/2022, 11:18 AMephemient
11/15/2022, 11:19 AMrednifre
11/15/2022, 11:20 AMephemient
11/15/2022, 11:20 AMephemient
11/15/2022, 11:33 AMenum class Example {
Foo {
override fun toString(): String = "foo"
},
Bar
}
Example::class.java != Example.Foo::class.java
Example::class.java == Example.Foo.declaringClass
Example::class.java == Example.Bar::class.java
ephemient
11/15/2022, 11:34 AMephemient
11/15/2022, 11:34 AMephemient
11/15/2022, 11:37 AMStephan Schroeder
11/15/2022, 1:57 PMJohann Pardanaud
11/15/2022, 2:53 PMrednifre
11/15/2022, 4:08 PM