-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Implicit conversion isn't applied for Id type alias #8049
Comments
It also compiles if
it compiles OK. What happens here is that A possible fix is to see "through" the alias to realize that |
Btw, these are really useful minimizations! Thanks for putting in the effort. |
I’m not sure whether it is the same issue or not, but the suggested imports contain duplicated entries:
Minimized code: import Ordering.Implicits.seqOrdering
class Foo
object OrderingInstances {
implicit def orderingFoo: Ordering[Foo] = ???
}
List(List(new Foo)).sorted |
minimized code
Compilation output
expectation
This compiles on Scala 2. I'm running into this in the Cats tests, where we use ScalaTest's
should
matchers to tests methods on e.g.WriterT[Id, A, B]
, which returnId[C]
whereC
is inferred.If you change
Id
to something liketype Id[A] = List[A]
and editFoo
appropriately, it compiles fine on Dotty.The text was updated successfully, but these errors were encountered: