<Kotlin SAM `AbstractMethodError`> Why does the Sa...
# stackoverflow
u
Kotlin SAM `AbstractMethodError` Why does the SamTest2 interface throw an AbstractMethodError when accessing the other property? A default implementation is provided in the interface so I assumed the anonymous instance created in the main method would work properly. Is this an incorrect assumption? fun interface SamTest1 { fun method1(value: String): Boolean fun other(): String = "test" } fun interface SamTest2 { fun method1(value: String): Boolean val other: String get() = "test" } fun main() { val sam1...