You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using a selector in an import statement removes the implicit nature of the imported value (tested in scala-2.7.5.final and scala-2.8.0.r18762):
objectA { implicitvalx=1 }
importA.x
implicitly[Int] // 1// restartobjectA { implicitvalx=1 }
importA.{x=>y}
implicitly[Int] // error: could not find implicit value for parameter e: Int
y // 1
x // error: not found: value x [as expected]
Is it on purpose ?
The text was updated successfully, but these errors were encountered:
scala>objectA { implicitvalx=1 }
defined module A
scala>importA.{x=>y}
importA.{x=>y}
scala> y
res1:Int=1
scala> implicitly[Int]
<console>:10:error: could not find implicit value for parameter e: Int
implicitly[Int]
^
scala>:implicits
No implicits have been imported other than those in Predef.
scala>importA.ximportA.x
scala>:implicits
/* 1 implicit members imported from A *//* 1 defined in A */implicitvalx:Int
Using a selector in an import statement removes the implicit nature of the imported value (tested in scala-2.7.5.final and scala-2.8.0.r18762):
Is it on purpose ?
The text was updated successfully, but these errors were encountered: