scala coalesces multiple function call parameters into a Tuple — can this be disabled?

后端 未结 6 1691
闹比i
闹比i 2020-12-10 06:34

This is a troublesome violation of type safety in my project, so I\'m looking for a way to disable it. It seems that if a function takes an AnyRef (or a java.lang.Object), y

6条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-10 07:05

    I think the definition of (x, y) in Predef is responsible. The "-Yno-predefs" compiler flag might be of some use, assuming you're willing to do the work of manually importing any implicits you otherwise need. By that I mean that you'll have to add import scala.Predef._ all over the place.

提交回复
热议问题