We need a way to hide methods of a class based on the substitution for some type parameter. This can be used to hide the predict method of models that are not fitted
Desired solution
Add a new constraint:
class Model<State = TrainingState.Unfitted> {
fun predict() where {
State sub TrainingState.Fitted
}
}
If the constraints is false, but predict is used, show an error. This can be combined with #1082.
If the constraint is false, don't suggest the method in code completion.
Is your feature request related to a problem?
We need a way to hide methods of a class based on the substitution for some type parameter. This can be used to hide the
predict
method of models that are not fittedDesired solution
Add a new constraint:
Possible alternatives (optional)
No response
Screenshots (optional)
No response
Additional Context (optional)
No response