statmark56
09/01/2022, 2:48 PMsealed class Element<T>(val value: T)
object Test : Element(10) // expecting compiler somehow able to refer the implicit integer 10 value to resolve T
But actually need to explicitly declare the argument type to satisfy the compiler:
object Test : Element<Int>(10)
Any reason why? Thank you.ephemient
09/01/2022, 4:33 PM