-
-
Notifications
You must be signed in to change notification settings - Fork 428
Type error in parametrized interface. #1875
Copy link
Copy link
Labels
needs investigationThis needs to be looked into before its "ready for work"This needs to be looked into before its "ready for work"
Description
The following setup:
interface State[S, I, O]
fun val apply(state: S, input: I): (S, O)
fun val bind[O2](next: State[S, O, O2]): State[S, I, O2]
doesn't typecheck. The compiler complains that
type argument is outside its constraint
argument: O #any
constraint: O2 #any
O #any is not a subtype of O2
Aliasing O to some other name or replacing it with any of the other types in the bind definition makes it compile.
I'm running ponyc v0.13.1 on Arch Linux.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
needs investigationThis needs to be looked into before its "ready for work"This needs to be looked into before its "ready for work"