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
Welcome to Scala version 2.11.1-20141007-151233-f67aa50599 (JavaHotSpot(TM) 64-BitServerVM, Java1.6.0_65).
Type in expressions to have them evaluated.
Type:help for more information.
scala>objectTest {
|defa[R](implicits: List[R]):Int=0|defa_=[R](v: Int)(implicits: List[R]) = ()
| }
defined objectTest
scala>importTest._importTest._
scala>implicitvalimplicitVal:List[Int]=null
implicitVal:List[Int] =null
scala> a_=(1)
scala> a =1
<console>:50:error: reassignment to val
a =1
^
So the syntactic sugar version "a = 1" is rejected while the (I presume) equivalent raw version "a_=(1)" is accepted.
This does not seem to happen when the implicit parameter is of a type that is not parameterized:
So the syntactic sugar version "a = 1" is rejected while the (I presume) equivalent raw version "a_=(1)" is accepted.
This does not seem to happen when the implicit parameter is of a type that is not parameterized:
Issue #4237 has a title that also covers this problem: "Syntactic sugar for calling mutator doesn't always work"; however it has already been closed.
The text was updated successfully, but these errors were encountered: