This page is no longer maintained — Please continue to the home page at www.scala-lang.org

Implicit conversion and scalac

1 reply
edmondo1984
Joined: 2011-09-14,
User offline. Last seen 28 weeks 3 days ago.
Dear All,how does the scala compiler handles implicit conversions?
If in the same method I access 3 methods of PimpMyInt on the same Int object, will the conversion be executed only once?
Best Regards
Edmondo
Sciss
Joined: 2008-12-17,
User offline. Last seen 28 weeks 5 days ago.
Re: Implicit conversion and scalac

if your pimp'ed Int's operators return an Int, you will see three conversions.

On 28 Dec 2011, at 14:00, Edmondo Porcu wrote:

> Dear All,
> how does the scala compiler handles implicit conversions?
>
> If in the same method I access 3 methods of PimpMyInt on the same Int object, will the conversion be executed only once?
>
> Best Regards
>
> Edmondo

Copyright © 2012 École Polytechnique Fédérale de Lausanne (EPFL), Lausanne, Switzerland