File tree 2 files changed +4
-13
lines changed
main/scala/shapeless/syntax/std
2 files changed +4
-13
lines changed Original file line number Diff line number Diff line change @@ -21,18 +21,16 @@ package std
21
21
import shapeless .ops .hlist .ProductToHList
22
22
23
23
trait LowPriorityTuple {
24
- @ deprecated(" Ambiguous with productOps" , " 2.3.5" )
25
- def productTupleOps [P <: Product ](p : P ): TupleOps [P ] = new TupleOps (p)
24
+ implicit def productTupleOps [P <: Product ](p : P ): TupleOps [P ] = new TupleOps (p)
26
25
}
27
26
28
27
object tuple extends LowPriorityTuple {
29
- @ deprecated(" Redundant with tupleOps" , " 2.3.5" )
30
- def unitTupleOps (u : Unit ): TupleOps [Unit ] = new TupleOps (u)
28
+ implicit def unitTupleOps (u : Unit ): TupleOps [Unit ] = new TupleOps (u)
31
29
32
30
// Duplicated here from shapeless.HList so that explicit imports of tuple._ don't
33
31
// clobber the conversion to HListOps.
34
32
implicit def hlistOps [L <: HList ](l : L ) : HListOps [L ] = new HListOps (l)
35
- implicit def tupleOps [P : IsTuple ](p : P ): TupleOps [P ] = new TupleOps (p)
33
+ private [shapeless] def tupleOps [P : IsTuple ](p : P ): TupleOps [P ] = new TupleOps (p)
36
34
}
37
35
38
36
final class TupleOps [T ](t : T ) extends Serializable {
Original file line number Diff line number Diff line change @@ -1463,7 +1463,7 @@ class TupleTests {
1463
1463
1464
1464
@ Test
1465
1465
def testPropagation : Unit = {
1466
- def useHead [P : IsTuple : IsComposite ](p : P ) = p.head
1466
+ def useHead [P <: Product : IsComposite ](p : P ) = p.head
1467
1467
val h = useHead((23 , " foo" , true ))
1468
1468
typed[Int ](h)
1469
1469
}
@@ -1973,11 +1973,4 @@ class TupleTests {
1973
1973
(23, "foo").align[(String, String)]
1974
1974
""" )
1975
1975
}
1976
-
1977
- @ Test
1978
- def testCompatibilityWithProductSyntax : Unit = {
1979
- import syntax .std .product ._
1980
- assertEquals(List (2 , " a" ), Foo (2 , " a" ).to[List ])
1981
- assertEquals(List (2 , " a" ), (2 , " a" ).to[List ])
1982
- }
1983
1976
}
You can’t perform that action at this time.
0 commit comments