title: illegal start of simple expression Scala
body: <p>I have two version of Scala compiler 2.11.12 and 2.12.4. I have a code which overrides read and write method of a json protocol. The code is something like this.</p>
  
  <pre><code>implicit lazy val abcJsonProtocol: RootJsonFormat[XYZ] = new 
  RootJsonFormat[XYZ] {
  
    override def write(obj: XYZ): JsValue = {
      val baseJson =
        JsObject(
      “abc” -&gt; obj.efg.toJson,
      “ikj” -&gt; obj.mno.toJson
      )
  
      obj
        .map(value =&gt; JsObject(baseJson.fields + (“wxy” -&gt; 
        value.toJson)))
      .getOrElse(baseJson)
    }
  
    override def read(value: JsValue): XYZ = {
      val jsObject = value.asJsObject
      jsObject.getFields("abc",
        "kJ") match {
        case Seq(efg, mno) =&gt;
          XYZ(
            efg = efg.convertTo[String],
            mno = mno.convertTo[String],
  
          )
      }
    }
     }
  </code></pre>
  
  <p>The error is something likes this </p>
  
  <pre><code>illegal start of simple expression
  [error]           )
  [error]           ^
  ')' expected but '}' found.
  [error]         }
  [error]         ^
  </code></pre>
  
  <p>The compilation fails only in 2.11.12 version and passes in the latter version
  Thanks in advance.</p>