Open
Description
Compiler version
3.1.2
Minimized code
object Content:
implicit lazy val answer: Int = 42
object DSL:
export scala.language.postfixOps
export Content.answer
extension (n: Int)
def test : Boolean = n == 1
object Test:
import DSL.{*, given}
val a = answer // works
val b = 2 test // fails
Output
postfix operator `test` needs to be enabled
by making the implicit value scala.language.postfixOps visible.
Expectation
Compile.
Requiring the feature flag imports everywhere (some logic using these is used) is cumbersome.
Moreover, it is often desireable to encapsulate these in (optional) objects, avoiding compiler options making them avaiable to the whole project.