This page is no longer maintained — Please continue to the home page at

2.9.0 implicits bug?

No replies
Joined: 2009-06-23,
User offline. Last seen 33 weeks 5 days ago.



As I read in spec for 2.9.0:

In a selection e.m(args) with e of type T , if the selector m denotes some member(

s) of T , but none of these members is applicable to the arguments args. In

this case a view v is searched which is applicable to e and whose result contains

a method m which is applicable to args. The search proceeds as in the

case of implicit parameters, where the implicit scope is the one of T . If such a

view is found, the selection e.m is converted to v(e).m(args).


So this example should be ok:


class Test {


  class A {

    def fooa(x: Int) = 1



  class B {

    def fooa(x : Boolean) = false



  implicit def s2a(x: String): A = new A


  implicit def s2b(x: String): B = new B





But I didn’t find a way to compile this example with any compiler version. So maybe this example should be wrong for some reason?


Best regards,

Alexander Podkhalyuzin.

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