Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conflicts between syntax.std.tuple and syntax.std.product #307

Closed
alexarchambault opened this issue Jan 4, 2015 · 0 comments · Fixed by #979
Closed

Conflicts between syntax.std.tuple and syntax.std.product #307

alexarchambault opened this issue Jan 4, 2015 · 0 comments · Fixed by #979

Comments

@alexarchambault
Copy link
Collaborator

Already briefly discussed here #296, but still applies:

scala> import syntax.std.tuple._, syntax.std.product._
import syntax.std.tuple._
import syntax.std.product._

scala> case class Foo(i: Int, s: String)
defined class Foo

scala> Foo(2, "a").to[List]
<console>:19: error: type mismatch;
 found   : Foo
 required: ?{def to: ?}
Note that implicit conversions are not applicable because they are ambiguous:
 both method productTupleOps in trait LowPriorityTuple of type [P <: Product](p: P)shapeless.syntax.std.TupleOps[P]
 and method productOps in object product of type [P <: Product](p: P)shapeless.syntax.std.ProductOps[P]
 are possible conversion functions from Foo to ?{def to: ?}
              Foo(2, "a").to[List]
                 ^
<console>:19: error: value to is not a member of Foo
              Foo(2, "a").to[List]
                          ^
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants