Skip to content
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