sealed class ResourceState<out R> {
data class Success<out T>(val data: T) : ResourceState<T>()
data class Error(val throwable: Throwable) : ResourceState<Nothing>()
object Loading : ResourceState<Nothing>()
object Empty : ResourceState<Nothing>()
}
Generates generic class type T like this
public enum ResourceStateKs<R : AnyObject> {
case empty
case error(ResourceStateError)
case loading
case success(ResourceStateSuccess<T>)
...
Which says Cannot find type 'T' in scope.
I guess it should've been something like this
public enum ResourceStateKs<R : AnyObject, T: AnyObject> {
case empty
case error(ResourceStateError)
case loading
case success(ResourceStateSuccess<T>)
...
Following code
Generates generic class type T like this
Which says Cannot find type 'T' in scope.
I guess it should've been something like this
Is it possible to fix this and generate properly?