mirror of https://github.com/sbt/sbt.git
Fix TupleMapExtensionTests
The compiler cannot infer F[_] on a concrete Tuple.Map[T, F[_]] because it reduces it to a (F[A], F[B], ...)
This commit is contained in:
parent
a607e54188
commit
4baf698a8c
|
|
@ -1,13 +1,12 @@
|
|||
package sbt.internal.util
|
||||
|
||||
import verify.BasicTestSuite
|
||||
import sbt.internal.util.TupleMapExtension.*
|
||||
|
||||
object TupleMapExtensionTest extends BasicTestSuite:
|
||||
val tuple: Tuple.Map[(Int, String), Option] = ((Option(1), Option("foo")))
|
||||
|
||||
test("tuple.mapN") {
|
||||
val f = (arg: (Int, String)) => arg._1.toString + "|" + arg._2
|
||||
val actual = tuple.mapN[String](f)
|
||||
val actual = TupleMapExtension.mapN[(Int, String), Option](tuple)(f)
|
||||
assert(actual == Option("1|foo"))
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue