Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow
import x.{*, given}
under -Xsource:3
Imagine a Scala 3 library containing: ``` object A { val a: Int = 1 given b: Int = 2 } ``` To import all members of `A` from Scala 2, we write `import A.*`, but to do the same from Scala 3, we need to write `import A.{*, given}` instead. This complicates cross-compilation for projects which depend on Scala 3 libraries (unless these libraries exclusively use `implicit` which is not something we want to encourage). This commit remedies this by allowing `import x.{*, given}` (and `import x.{given, *}`), this is easy to do since we can just pretend the user wrote `import x.*` which will give us both regular and given members in Scala 2 code and therefore match the semantics of Scala 3.
- Loading branch information