Joshua Hansen
06/02/2024, 1:14 AMExpected a class body
if I do this. Is this intended?
open class Test
val test = object : Test()
It seems to want an empty body afterwards.Vampire
06/02/2024, 1:36 AMVampire
06/02/2024, 1:38 AMJoshua Hansen
06/02/2024, 1:39 AMJoshua Hansen
06/02/2024, 2:06 AMval test = object : Test() {}
is effectively equivalent to
val test = Test()
So why use an anonymous object at all if you're not going to give it body? I think that's the idea.Vampire
06/02/2024, 2:08 AMVampire
06/02/2024, 2:09 AMTest
is abstract but does not have abstract membersJoshua Hansen
06/02/2024, 2:10 AM