-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for Scala 2.13 to core (#161)
Co-authored-by: Seth Tisue <[email protected]>
- Loading branch information
1 parent
9a850f4
commit 8c89893
Showing
5 changed files
with
50 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
core/src/main/scala/scala/tools/jardiff/JDKCollectionConvertersCompat.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package scala.tools.jardiff | ||
|
||
import scala.annotation.nowarn | ||
|
||
/** Magic to get cross-compiling access to `scala.jdk.CollectionConverters` | ||
* with a fallback on `scala.collection.JavaConverters`, without deprecation | ||
* warning in any Scala version. | ||
* | ||
* @see https://github.com/scala/scala-collection-compat/issues/208 | ||
*/ | ||
@nowarn("msg=Unused import") | ||
private[jardiff] object JDKCollectionConvertersCompat { | ||
object Scope1 { | ||
object jdk { | ||
type CollectionConverters = Int | ||
} | ||
} | ||
import Scope1._ | ||
|
||
object Scope2 { | ||
import scala.collection.{JavaConverters => CollectionConverters} | ||
|
||
object Inner { | ||
import scala._ | ||
import jdk.CollectionConverters | ||
val Converters = CollectionConverters | ||
} | ||
} | ||
|
||
val Converters = Scope2.Inner.Converters | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters