How to unimport String “+” operator in Scala?

后端 未结 3 1438
别跟我提以往
别跟我提以往 2020-12-06 16:41

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 conv

3条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-06 17:19

    The + method for a string is a method on of the String class (and therefore on each string object), and as such it cannot be unimported.

提交回复
热议问题