Skip to content

Commit

Permalink
Create i11982a.scala
Browse files Browse the repository at this point in the history
  • Loading branch information
Decel committed Mar 31, 2023
1 parent 0631b50 commit 872e731
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests/pos/i11982a.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package tuplefun
object Unpair {

def pair[A, B](using a: ValueOf[A], b: ValueOf[B]): Tuple2[A, B] =
(a.value, b.value)

def unpair[X <: Tuple2[?, ?]](
using a: ValueOf[Tuple.Head[X]],
b: ValueOf[Tuple.Head[Tuple.Tail[X]]] // error
): Tuple2[Tuple.Head[X], Tuple.Head[Tuple.Tail[X]]] = // error
type AA = Tuple.Head[X]
type BB = Tuple.Head[Tuple.Tail[X]] // error
pair[AA, BB](using a, b)
}

0 comments on commit 872e731

Please sign in to comment.