Skip to content

Commit ec5c0d4

Browse files
committed
Fix Scala 2.12 cross-compilation
1 parent 2696f18 commit ec5c0d4

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

.github/workflows/ci.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,15 @@ jobs:
1111
steps:
1212
- uses: actions/checkout@v3
1313
- run: ./bin/scalafmt --test
14+
cross-compilation:
15+
name: Cross Compilation
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v3
19+
- uses: coursier/[email protected]
20+
with:
21+
app: sbt
22+
- run: sbt +compile
1423
test:
1524
strategy:
1625
fail-fast: false

expression-compiler/src/main/scala-2/scala/tools/nsc/ExpressionCompilerBridge.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import java.{util => ju}
66
import scala.jdk.CollectionConverters._
77
import scala.tools.nsc.reporters.StoreReporter
88
import scala.util.control.NonFatal
9+
import scala.annotation
910

1011
final class ExpressionCompilerBridge {
1112
def run(
@@ -31,7 +32,7 @@ final class ExpressionCompilerBridge {
3132
) ++ options :+ sourceFile.toString
3233

3334
val command = new CompilerCommand(args, errorConsumer.accept(_))
34-
val reporter = new StoreReporter(command.settings)
35+
val reporter = new StoreReporter(): @annotation.nowarn()
3536
val global = new ExpressionGlobal(
3637
command.settings,
3738
reporter,

0 commit comments

Comments
 (0)