Closed som-snytt closed 3 weeks ago
I don't understand why simply ignoring the import should be considered wrong?
The semantics of import ExecutionContext.Implicits.given
in Scala 3 is that it imports the implicits into the scope, so I guess you might consider treating it as import ExecutionContext.Implicits._
to match the energy?
Yes, for cross compiling, I think at least take given as star; with the caveat of course that it mustn't break imports, import x.{given, *}
must not introduce ambiguities.
If I were cross compiling, I would not want to write Implicits.{given, *}
for dotty.
reminder
import-given.scala:13: error: value given is not a member of object T
import T.given
and under -Xsource:3
import-given.scala:14: error: given requires a wildcard selector
import T.{foo, given}
Reproduction steps
Scala version: 2.13.14
under -Xsource:3-cross,
import ExecutionContext.Implicits.given
is ignored rather than taken as*
.Problem
If cross-compiling, I don't want
*
, even if scala 2 must approximategiven
.Also, it would probably be easy to just make
given
actually work in imports.