Skip to content

Fix #7859: Add test case #8417

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 2, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions tests/pos/i8397.scala
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
given foo(using x: Int) as AnyRef:
type T = x.type

// #7859

trait Lub2[A, B]:
type Output

given [A <: C, B <: C, C] as Lub2[A, B]:
type Output = C

trait Lub[Union]:
type Output

given [A] as Lub[A]:
type Output = A

given [Left, Right](
using lubLeft: Lub[Right], lubRight: Lub[Right])(
using lub2: Lub2[lubLeft.Output, lubRight.Output])
as Lub[Left | Right]:
type Output = lub2.Output