You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
traitLub2[A, B] {
typeOutput
}
given [A<:C, B<:C, C]:Lub2[A, B] {
typeOutput=C
}
traitLub[Union] {
typeOutput
}
given [A]:Lub[A] {
typeOutput=A
}
// non-private type Output in class given_Lub_Left refers to private value lub2// in its type signature = given_Lub_Left.this.lub2.Outputgiven [Left, Right](givenlubLeft:Lub[Right], lubRight: Lub[Right])(givenlub2:Lub2[lubLeft.Output, lubRight.Output]):Lub[Left|Right] {
typeOutput= lub2.Output
}
expectation
It should compile because the identical code compiles as following:
The identical code has a different type, though: It's Lub[Left | Right], without the type refinement. But that begs the question how we can get a path dependency on a parameter of a given instance. Something is clearly missing here.
minimized code
expectation
It should compile because the identical code compiles as following:
The text was updated successfully, but these errors were encountered: