Skip to content

Commit 3060c36

Browse files
author
Martijn Hoekstra
committed
reset compilation unit
1 parent bbdfc70 commit 3060c36

File tree

3 files changed

+5
-17
lines changed

3 files changed

+5
-17
lines changed

compiler/src/dotty/tools/dotc/CompilationUnit.scala

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,6 @@ import dotty.tools.dotc.core.Symbols._
1212
import dotty.tools.dotc.transform.SymUtils._
1313
import dotty.tools.dotc.typer.Inliner
1414

15-
16-
import dotty.tools.dotc.reporting.diagnostic.MessageContainer
17-
/*
18-
trait WarningTransformer {
19-
val transformer: MessageContainer => Option[MessageContainer]
20-
position: Position
21-
}
22-
*/
23-
2415
class CompilationUnit(val source: SourceFile) {
2516

2617
override def toString: String = source.toString
@@ -29,9 +20,7 @@ class CompilationUnit(val source: SourceFile) {
2920

3021
var tpdTree: tpd.Tree = tpd.EmptyTree
3122

32-
//var warningTransformers: List[WarningTransformer] = Nil
33-
34-
def isJava = source.file.name.endsWith(".java")
23+
def isJava: Boolean = source.file.name.endsWith(".java")
3524

3625
/** Pickled TASTY binaries, indexed by class. */
3726
var pickled: Map[ClassSymbol, Array[Byte]] = Map()

compiler/src/dotty/tools/dotc/config/ScalaSettings.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ class ScalaSettings extends Settings.SettingGroup {
6666
val XmaxInlines: Setting[Int] = IntSetting("-Xmax-inlines", "Maximal number of successive inlines", 32)
6767
val XmaxClassfileName: Setting[Int] = IntSetting("-Xmax-classfile-name", "Maximum filename length for generated classes", 255, 72 to 255)
6868
val Xmigration: Setting[ScalaVersion] = VersionSetting("-Xmigration", "Warn about constructs whose behavior may have changed since version.")
69-
val Xprint:Setting[List[String]] = PhasesSetting("-Xprint", "Print out program after")
69+
val Xprint: Setting[List[String]] = PhasesSetting("-Xprint", "Print out program after")
7070
val XprintTypes: Setting[Boolean] = BooleanSetting("-Xprint-types", "Print tree types (debugging option).")
7171
val XprintDiff: Setting[Boolean] = BooleanSetting("-Xprint-diff", "Print changed parts of the tree since last print.")
7272
val XprintDiffDel: Setting[Boolean] = BooleanSetting("-Xprint-diff-del", "Print changed parts of the tree since last print including deleted parts.")

compiler/src/dotty/tools/dotc/reporting/Reporter.scala

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,9 @@ import dotty.tools.dotc.reporting.diagnostic.MessageContainer
4646
escalated <- fatalWarnings(allowedKind)
4747
} yield escalated
4848

49-
def suppressedIds: List[Int] = this.settings.XsuppressMessageIds.value.flatMap(id => {
50-
print(s"parsed $id")
51-
scala.util.Try(id.toInt).toOption
52-
})
49+
def suppressedIds: List[Int] = this.settings.XsuppressMessageIds.value
50+
.flatMap(id => scala.util.Try(id.toInt).toOption)
51+
5352
def suppressIds(mc: MessageContainer) = {
5453
val errornumber = mc.contained().errorId.errorNumber()
5554
mc match {

0 commit comments

Comments
 (0)