- About Scala
- Documentation
- Code Examples
- Software
- Scala Developers
Re: issue with implicit conversion
Fri, 2009-02-27, 16:44
>>>>> "Raphael" == Raphael Jolly writes:
Raphael> x+x*y
Raphael> error: type mismatch; [java] found : Poly[Poly[A]] [java]
Raphael> required: Poly[A] [java] x+x*y [java] ^
Raphael> I would like to know if this is by design, or if not, if there
Raphael> is a chance that it might be corrected in the future.
I looked at this for a while and I cannot understand why this doesn't
compile. Either it's a compiler bug, or there's something I don't
understand about the rules for implicits (and hopefully someone can
educate both of us).
On Fri, Feb 27, 2009 at 9:44 AM, Seth Tisue wrote:
>>>>>> "Raphael" == Raphael Jolly writes:
>
> Raphael> x+x*y
>
> Raphael> error: type mismatch; [java] found : Poly[Poly[A]] [java]
> Raphael> required: Poly[A] [java] x+x*y [java] ^
>
> Raphael> I would like to know if this is by design, or if not, if there
> Raphael> is a chance that it might be corrected in the future.
>
> I looked at this for a while and I cannot understand why this doesn't
> compile. Either it's a compiler bug, or there's something I don't
> understand about the rules for implicits (and hopefully someone can
> educate both of us).
>
Yeah, this seems really weird. It seems like type inference is
proceeding top-down and committing too early, but I have no idea if
this is "as specified" or a bug... I hope it's a bug.
Matt