File tree Expand file tree Collapse file tree 1 file changed +11
-5
lines changed
sbt-dotty/src/dotty/tools/sbtplugin Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -27,7 +27,8 @@ object DottyPlugin extends AutoPlugin {
2727
2828 implicit class DottyCompatModuleID (moduleID : ModuleID ) {
2929 /** If this ModuleID cross-version is a Dotty version, replace it
30- * by the Scala 2.x version that the Dotty version is retro-compatible with.
30+ * by the Scala 2.x version that the Dotty version is retro-compatible with,
31+ * otherwise do nothing.
3132 *
3233 * This setting is useful when your build contains dependencies that have only
3334 * been published with Scala 2.x, if you have:
@@ -46,10 +47,15 @@ object DottyPlugin extends AutoPlugin {
4647 * Dotty is released, you should not rely on it.
4748 */
4849 def withDottyCompat (): ModuleID =
49- moduleID.cross(CrossVersion .binaryMapped {
50- case version if version.startsWith(" 0." ) => " 2.11"
51- case version => version
52- })
50+ moduleID.crossVersion match {
51+ case _ : CrossVersion .Binary =>
52+ moduleID.cross(CrossVersion .binaryMapped {
53+ case version if version.startsWith(" 0." ) => " 2.11"
54+ case version => version
55+ })
56+ case _ =>
57+ moduleID
58+ }
5359 }
5460 }
5561
You can’t perform that action at this time.
0 commit comments