diff options
author | Jason Zaugg <jzaugg@gmail.com> | 2013-04-07 14:52:07 +0200 |
---|---|---|
committer | Jason Zaugg <jzaugg@gmail.com> | 2013-04-08 16:24:12 +0200 |
commit | 9d7f81103b423a51b021ab80884cfbc57bfb75f6 (patch) | |
tree | d9651a6fdbd821932b2c4d2e5e17a52351e50b1e /src/compiler/scala/tools/nsc/typechecker/Contexts.scala | |
parent | d43f5ce5aa10e39ad05a385c31fc7178eba997c1 (diff) | |
download | scala-9d7f81103b423a51b021ab80884cfbc57bfb75f6.tar.gz scala-9d7f81103b423a51b021ab80884cfbc57bfb75f6.tar.bz2 scala-9d7f81103b423a51b021ab80884cfbc57bfb75f6.zip |
SI-7335 Don't import Predef._ in Predef.scala
The check for this was foiled by the introduction of
DeprecatedPredef in c26a8db0. This didn't cause any
harm, but in any case this commit restores the intended
state of affairs.
The change is visible only through logging; no test case
is included.
qbin/scalac -Ydebug -Ylog:all src/library/scala/Predef.scala -Ystop-after:typer 2>&1 | grep -i "Omitted import of Predef"
[log namer] Omitted import of Predef._ for Predef.scala
[log typer] Omitted import of Predef._ for Predef.scala
A redundant override of `firstDefinesClassOrObject` is also
removed.
Maybe we can remove the special case altogether?
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/Contexts.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Contexts.scala | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Contexts.scala b/src/compiler/scala/tools/nsc/typechecker/Contexts.scala index e89a860e0f..f135f7f6ae 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Contexts.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Contexts.scala @@ -81,7 +81,10 @@ trait Contexts { self: Analyzer => if (settings.noimports) Nil else if (unit.isJava) RootImports.javaList - else if (settings.nopredef || treeInfo.noPredefImportForUnit(unit.body)) RootImports.javaAndScalaList + else if (settings.nopredef || treeInfo.noPredefImportForUnit(unit.body)) { + debuglog("Omitted import of Predef._ for " + unit) + RootImports.javaAndScalaList + } else RootImports.completeList } |