We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0f0137e commit 66b8a7dCopy full SHA for 66b8a7d
tests/pos/9871.scala
@@ -0,0 +1,11 @@
1
+object Test {
2
+ type IsTypeInTuple[T, Tup <: Tuple] = Tup match {
3
+ case EmptyTuple => false
4
+ case T *: ts => true
5
+ case _ *: ts => IsTypeInTuple[T, ts]
6
+ }
7
+ summon[(Int *: String *: EmptyTuple) =:= (Int, String)] //they are the same
8
+ summon[IsTypeInTuple[String, Int *: String *: EmptyTuple] =:= true] //compiles
9
+ summon[IsTypeInTuple[String, (Int, String)] =:= true] //doesn't compile
10
+ summon[IsTypeInTuple[String, compiletime.Widen[Int *: String *: EmptyTuple]] =:= true] // doesn't compiles
11
+}
0 commit comments