@propensive Any help would be greatly appreciated!
-
-
Replying to @JonathanChayat
@JonathanChayat Hi Jonathan! I got it working by redefining: def foo[T, S <: R[_ >: T]](x: T)(implicit ev: S) = 0 Does that help?2 replies 0 retweets 0 likes -
Replying to @propensive
@JonathanChayat They may well be legitimate type errors, though! Maybe def foo[T, S <: R[_ >: T <: A]] would help in that case. Not sure. :/1 reply 0 retweets 0 likes -
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 @propensive
@propensive Seems like a compiler bug to me. I've opened an issue https://issues.scala-lang.org/browse/SI-91693 replies 0 retweets 0 likes
@JonathanChayat If it is (I'd need to spend longer to convince myself) I'd be surprised if there's not already an open issue for it...
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.