any idea why I am getting this? ``` override fun &...
# announcements
a
any idea why I am getting this?
Copy code
override fun <SubsystemStateCondition>getConditionValue(): SubsystemStateCondition {
        return state
    }
Copy code
interface Condition {
    fun <T> getConditionValue(): T
}
n
i think you want to have T on the interface.. i am not sure if overriding functions can permanently fix a generic parameter to a type but the error message does seem a bit confusing to me too
d
Remove the type parameter so that the return type is resolved to your real type called SybsystemStateCondition
p
Yea, I guess you want to move generic type parameter
<T>
from function to interface, then your class can implement interface with
SubsystemStateCondition
type parameter and return type of overridden function will be fixed.