Scala, sbt: resolving postfix operator needs to be enabled error

Environment:

  • Scala: 2.13.1
  • sbt: 1.3.8

An error: postfix operator needs to be enabled by making the implicit value scala.language.postfixOps visible can be resolved by adding the following line to the build.sbt file:

scalacOptions ++= Seq(
  "-language:postfixOps"
)