Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 33da1ee

Browse files
Remove some unsafe nulls
1 parent 2ffe816 commit 33da1ee

18 files changed

+5
-23
lines changed

‎compiler/src/dotty/tools/backend/jvm/BCodeAsmCommon.scala‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ package dotty.tools
22
package backend
33
package jvm
44

5-
//import scala.language.unsafeNulls
6-
75
import dotty.tools.dotc.core.Flags.*
86
import dotty.tools.dotc.core.Symbols.*
97
import dotty.tools.dotc.report

‎compiler/src/dotty/tools/backend/jvm/BackendUtils.scala‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import scala.collection.mutable
88
import scala.jdk.CollectionConverters.*
99
import dotty.tools.dotc.report
1010

11-
//import scala.language.unsafeNulls
1211

1312
/**
1413
* This component hosts tools and utilities used in the backend that require access to a `BTypes`

‎compiler/src/dotty/tools/backend/jvm/CodeGen.scala‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package dotty.tools.backend.jvm
22

3-
//import scala.language.unsafeNulls
43

54
import dotty.tools.dotc.CompilationUnit
65
import dotty.tools.dotc.ast.Trees.{PackageDef, ValDef}
@@ -68,7 +67,7 @@ class CodeGen(val int: DottyBackendInterface, val primitives: DottyPrimitives)(
6867
null
6968

7069
if sym.isClass then
71-
val tastyAttrNode = if (mirrorClassNode ne null) mirrorClassNode else mainClassNode// LHOTAK
70+
val tastyAttrNode = if (mirrorClassNode ne null) mirrorClassNode else mainClassNode
7271
genTastyAndSetAttributes(sym, tastyAttrNode)
7372

7473
def registerGeneratedClass(classNode: ClassNode | Null, isArtifact: Boolean): Unit =

‎compiler/src/dotty/tools/backend/jvm/DottyBackendInterface.scala‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package dotty.tools.backend.jvm
22

3-
//import scala.language.unsafeNulls
43

54
import dotty.tools.dotc.ast.tpd
65
import dotty.tools.dotc.core.Flags.*

‎compiler/src/dotty/tools/backend/jvm/GeneratedClassHandler.scala‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ import scala.util.control.NonFatal
1414
import dotty.tools.dotc.core.Phases
1515
import dotty.tools.dotc.core.Decorators.em
1616

17-
//import scala.language.unsafeNulls
1817
import scala.compiletime.uninitialized
1918

2019
/**
@@ -189,4 +188,4 @@ final private class CompilationUnitInPostProcess(private var classes: List[Gener
189188
var task: Future[Unit] = uninitialized
190189

191190
val bufferedReporting = new PostProcessorFrontendAccess.BufferingBackendReporting()
192-
}
191+
}

‎compiler/src/dotty/tools/dotc/classpath/ZipArchiveFileLookup.scala‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
*/
44
package dotty.tools.dotc.classpath
55

6-
//import scala.language.unsafeNulls
76

87
import java.io.File
98
import java.net.URL

‎compiler/src/dotty/tools/dotc/config/OutputDirs.scala‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package dotty.tools
22
package dotc
33
package config
44

5-
//import scala.language.unsafeNulls
65

76
import io.*
87

‎compiler/src/dotty/tools/dotc/config/Properties.scala‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package dotty.tools
22
package dotc
33
package config
44

5-
import scala.language.unsafeNulls
65

76
import scala.annotation.internal.sharable
87

@@ -45,7 +44,7 @@ trait PropertiesTrait {
4544

4645
def propIsSet(name: String): Boolean = System.getProperty(name) != null
4746
def propIsSetTo(name: String, value: String): Boolean = propOrNull(name) == value
48-
def propOrElse(name: String, alt: => String): String = Option(System.getProperty(name)).getOrElse(alt)
47+
def propOrElse(name: String, alt: => String|Null): String = Option(System.getProperty(name)).getOrElse(alt)
4948
def propOrEmpty(name: String): String = propOrElse(name, "")
5049
def propOrNull(name: String): String = propOrElse(name, null)
5150
def propOrNone(name: String): Option[String] = Option(propOrNull(name))

‎compiler/src/dotty/tools/dotc/coverage/Serializer.scala‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ package coverage
33

44
import java.nio.file.{Path, Paths, Files}
55
import java.io.Writer
6-
import scala.language.unsafeNulls
76
import scala.collection.mutable.StringBuilder
87

98
/**

‎compiler/src/dotty/tools/dotc/sbt/APIUtils.scala‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package dotty.tools.dotc
22
package sbt
33

4-
//import scala.language.unsafeNulls
54

65
import core.*
76
import Contexts.*

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /