Settingdust
12/07/2023, 6:17 AMSealed types cannot be instantiated
when try to initMichael de Kaste
12/07/2023, 8:00 AMenum planet { EARTH, MARS, etc. }
Ronny Bräunlich
12/07/2023, 1:12 PMSettingdust
12/07/2023, 2:17 PMxoangon
12/07/2023, 6:59 PMDaniel Pitts
12/07/2023, 9:05 PMDaniel Pitts
12/07/2023, 9:06 PMDaniel Pitts
12/07/2023, 9:10 PMDaniel Pitts
12/07/2023, 9:10 PMDaniel Pitts
12/07/2023, 9:12 PMDaniel Pitts
12/07/2023, 9:13 PMsealed class Foo permits Bar {
static @NotNull Foo instance() {
return new Foo();
}
}
Then in Kotlin, you can call Foo.instance()