aoriani
12/18/2017, 11:18 PMvalue with the right type T. If the compiler only looks to the class definitions, it may think that :
sealed class Result
data class Success<out T>(val value: T): Result()
data class Error(val msg: String): Result()
would be enough.