Skip to content

Commit e30f6d9

Browse files
committed
chore: make the compiler and library compile
1 parent 8d3a3a5 commit e30f6d9

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

compiler/src/dotty/tools/backend/jvm/GenBCode.scala

+2-2
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ class GenBCode extends Phase { self =>
109109
result
110110
finally
111111
// frontendAccess and postProcessor are created lazilly, clean them up only if they were initialized
112-
if _frontendAccess ne null then
112+
if !(_frontendAccess eq null) then
113113
frontendAccess.compilerSettings.outputDirectory match {
114114
case jar: JarArchive =>
115115
if (ctx.run.nn.suspendedUnits.nonEmpty)
@@ -120,7 +120,7 @@ class GenBCode extends Phase { self =>
120120
jar.close()
121121
case _ => ()
122122
}
123-
if _postProcessor ne null then
123+
if !(_postProcessor eq null) then
124124
postProcessor.classfileWriter.close()
125125
generatedClassHandler.close()
126126
}

project/Build.scala

+2-1
Original file line numberDiff line numberDiff line change
@@ -1110,7 +1110,8 @@ object Build {
11101110
(Compile / scalacOptions) ++= Seq(
11111111
// Needed so that the library sources are visible when `dotty.tools.dotc.core.Definitions#init` is called
11121112
"-sourcepath", (Compile / sourceDirectories).value.map(_.getAbsolutePath).distinct.mkString(File.pathSeparator),
1113-
"-Yexplicit-nulls",
1113+
// "-Yexplicit-nulls", TODO: Enable it back
1114+
"-Ycompile-scala2-library"
11141115
),
11151116
(Compile / doc / scalacOptions) ++= ScaladocConfigs.DefaultGenerationSettings.value.settings,
11161117
(Compile / packageSrc / mappings) ++= {

0 commit comments

Comments
 (0)