Guillaume Martres

Results 217 comments of Guillaume Martres

This message comes from the `@implicitNotFound` of Monad: https://github.com/typelevel/cats/blob/6bd3e00c50ad1d30a3cd4b55fc967ea0c1c1310c/core/src/main/scala/cats/Monad.scala#L15 We intentionally look for `@implicitNotFound` in parents, but I guess Scala 2 doesn't? Maybe we should revert to the Scala 2...

> Should we prepend the default error message as Scala 2 does? Because existing implicitNotFound messages are designed with this behavior in mind, I think it makes sense to replicate...

Why do you expect this to not compile? `OneTypeParam[_]` is a subtype of `TwoTypeParam[_, _]`, and overrides are allowed to covariantly refine the result type. Also the type you get...

The issue here is that scala 2 is not emitting a bridge in Child for childMethod that returns TwoTypeParam, but scala 3 is.

> But otherwise how is Any =:= _? That's just how wildcards work, any type which is within its bound is =:= to it, otherwise you couldn't pass an `Array[Int]`...

The fundamental abstraction we're missing here is lambdas from terms to types: ```scala class TypedMultiMap[T Any]: def get(key: T): Set[K(key)] = ??? transparent inline def getInlined(key: T): Set[K(key)] = ???...

The context bound itself is a term parameter, for Singleton in particular it's an erased term parameter, but we still have the same issue about not being able to go...

We don't necessarily need to do the same, but for reference here's how Java does it: http://www.benf.org/other/cfr/switch-on-enum.html, it's complicated because it's designed to survive reordering and addition of fields to...

@hepin1989 without benchmark results you won't convince us that it's a "must done"

We've had to make dotty's implementation fairly close to scalac's for compatibility reasons, but I think product patterns at least are new: http://dotty.epfl.ch/docs/reference/changed/pattern-matching.html (they're mostly useful to pattern match on...