Strange error when setting scala JSON number converter

I'm trying to run this simple piece of code in IntelliJ scala worksheet:

import scala.util.parsing.json.JSON

val data =
"""
|{"bignum": 1234123412341234123412341234123412341234}
""".stripMargin

val myConversionFunc = {input : String => input.toString }
JSON.globalNumberParser = myConversionFunc

val obj = JSON.parseFull(data)
println(obj)

It works when I run it using scala from command line, but in IntelliJ I'm getting the weird error:

"Error:(28, 118) value JSON is not a member of A$A75.A$A75
inst$A$A.`get$$instance_0$$JSON.globalNumberParser`; println("JSON.globalNumberParser: " + {val $$temp$$ = inst$A$A.JSON.globalNumberParser; MacroPrinter210.printDefInfo($$temp$$).replace("inst$A$A.", "") + " = " + ( print$$$Worksheet$$$Array$$$($$temp$$) ).stripPrefix("A$A75$A$A75$")})
^"

 

Any ideas what causes it? 

Please sign in to leave a comment.