Skip to content

Commit

Permalink
Merge pull request #8408 from eed3si9n/wip/bridge-hack
Browse files Browse the repository at this point in the history
Extend the Gradle / sbt 0.13 leniency to Windows
  • Loading branch information
SethTisue committed Sep 10, 2019
2 parents f797de2 + 8509b0c commit ead235c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/compiler/scala/tools/nsc/Reporting.scala
Expand Up @@ -115,7 +115,9 @@ trait Reporting extends scala.reflect.internal.Reporting { self: ast.Positions w
val msg = s"$featureDesc $req be enabled\nby making the implicit value $fqname visible.$explain" replace ("#", construct)
// don't error on postfix in pre-0.13.18 xsbt/Compat.scala
def isSbtCompat =
(featureName == "postfixOps" && pos.source.path.endsWith("/xsbt/Compat.scala") && Thread.currentThread.getStackTrace.exists(_.getClassName.startsWith("sbt.")))
(featureName == "postfixOps" &&
(pos.source.path.endsWith("/xsbt/Compat.scala") || pos.source.path.endsWith("""\xsbt\Compat.scala""")) &&
Thread.currentThread.getStackTrace.exists(_.getClassName.startsWith("sbt.")))
if (required && !isSbtCompat) {
reporter.error(pos, msg)
} else featureWarning(pos, msg)
Expand Down

0 comments on commit ead235c

Please sign in to comment.