Marc Knaup
expect
sealed class Test { object A : Test() }
fun Test.print() { when (this) { is Test.A -> print() // calls method below } } fun Test.A.print() { // gets called println("A") }
fun Test.print() { when (this) { is Test.A -> print() // recursive call } } expect fun Test.A.print() // not called
louiscad
A modern programming language that makes developers happier.