I'm writing a DSL where the "+" operator is strictly numeric, like some other popular languages. It's close, but the String "+" operator is messing up my implicit conversions. What's the syntax for unimporting an operator of the String class?
Just to be clearer, instead of this:
scala> var x = "2" + 3; x: java.lang.String = 23
I'd like to get x: Int = 5
I imagine I just need 2 things to make that happen:
- Remove (unimport within my scope) the definition of "+" from Strings
- Define an implicit conversion of String to Int
I'm stuck on the first step.
Thanks