@JonathanChayat They may well be legitimate type errors, though! Maybe
def foo[T, S <: R[_ >: T <: A]] would help in that case. Not sure. :/
-
-
Replying to @propensive
@propensive First of all, Thanks! This is progress - however, now implicit search stops looking at companion objects for evidence.2 replies 0 retweets 0 likes -
Replying to @JonathanChayat
@propensive I've revised my question on SO so that the evidence is in the companion of A (which is more realistic).1 reply 0 retweets 0 likes -
Replying to @JonathanChayat
@propensive Do you understand why in def foo[T, TT >: T](x : T)(implicit ev: R[TT]) TT gets inferred the same as T?1 reply 0 retweets 0 likes -
Replying to @JonathanChayat
@JonathanChayat I'd guess because there's a unique possible `ev`, and the type is inferred from the resolved implicit. Sound plausible?1 reply 0 retweets 0 likes -
Replying to @propensive
@propensive I don't think so. It seems the type gets inferred before implicit search (making TT as specific as possible - meaning T)2 replies 0 retweets 0 likes -
Replying to @JonathanChayat
@JonathanChayat Hmm... If TT isn't mentioned in the first parameter block, it should be completely unconstrained in the second block.2 replies 0 retweets 0 likes -
-
Replying to @JonathanChayat
@JonathanChayat Hmmm... Have you tried -Xlog-implicits? I've had mixed success using that for diagnosis...2 replies 0 retweets 0 likes -
Replying to @propensive
@JonathanChayat I actually encountered a similar problem (a bit more complex, maybe) last week, and ended up giving up and using macros. :(2 replies 0 retweets 0 likes
@JonathanChayat The choice to use macros was partly influenced by -Xlog-implicits apparently being illogical...
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.