Skip to content

Commit 31c9f08

Browse files
committed
Revert "Tweak syntax of conditions in given instances"
This reverts commit 631b5fe.
1 parent bef5da3 commit 31c9f08

File tree

3 files changed

+2
-24
lines changed

3 files changed

+2
-24
lines changed

compiler/src/dotty/tools/dotc/parsing/Parsers.scala

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2792,10 +2792,7 @@ object Parsers {
27922792
var counter = nparams
27932793
def nextIdx = { counter += 1; counter }
27942794
val paramFlags = if ofClass then Private | Local | ParamAccessor else Param
2795-
val tps1 = tps match
2796-
case Tuple(tps1) :: Nil => tps1
2797-
case _ => tps
2798-
tps1.map(makeSyntheticParameter(nextIdx, _, paramFlags | Synthetic | Given))
2795+
tps.map(makeSyntheticParameter(nextIdx, _, paramFlags | Synthetic | Given))
27992796

28002797
/** OLD: GivenTypes ::= AnnotType {‘,’ AnnotType}
28012798
* NEW: GivenTypes ::= Type {‘,’ Type}

tests/pos/tupled-given.scala

Lines changed: 0 additions & 19 deletions
This file was deleted.

tests/run/poly-kinded-derives.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ object Test extends App {
77
given Show[Int] {}
88
given [T]: (st: Show[T]) => Show[Tuple1[T]]
99
given t2[T, U]: (st: Show[T], su: Show[U]) => Show[(T, U)]
10-
given t3 [T, U, V]: (Show[T], Show[U], Show[V]) => Show[(T, U, V)]
10+
given t3 [T, U, V]: (st: Show[T], su: Show[U], sv: Show[V]) => Show[(T, U, V)]
1111

1212
def derived[T](given m: Mirror.Of[T], r: Show[m.MirroredElemTypes]): Show[T] = new Show[T] {}
1313
}

0 commit comments

Comments
 (0)