Skip to content

Commit 7b69d33

Browse files
Add regression tests
1 parent 7171211 commit 7b69d33

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

tests/neg/i19949.scala

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
2+
trait T[N]:
3+
type M = N match
4+
case 0 => Any
5+
6+
val t: T[Double] = new T[Double] {}
7+
val x: t.M = "hello" // error
8+
9+
val z: T[Double]#M = "hello" // error

tests/pos/i19950.scala

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
2+
trait Apply[F[_]]:
3+
extension [T <: NonEmptyTuple](tuple: T)(using toMap: Tuple.IsMappedBy[F][T])
4+
def mapN[B](f: Tuple.InverseMap[T, F] => B): F[B] = ???
5+
6+
given Apply[Option] = ???
7+
given Apply[List] = ???
8+
given Apply[util.Try] = ???
9+
10+
@main def Repro = (Option(1), Option(2), Option(3)).mapN(_ + _ + _)

0 commit comments

Comments
 (0)