diff options
author | Seth Tisue <seth@tisue.net> | 2016-11-23 09:35:09 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-11-23 09:35:09 -0800 |
commit | 750465684a2aa5b8d24876037d85c2d1e3e873bd (patch) | |
tree | eba03b5b44fbf971fa3e7c41f0dcffa4095b5869 /src | |
parent | 9c5d3f81a667917b6a3aed5098182623c417c137 (diff) | |
parent | 601aa1cb245db1e21ee5a1bc97108eca2693b337 (diff) | |
download | scala-750465684a2aa5b8d24876037d85c2d1e3e873bd.tar.gz scala-750465684a2aa5b8d24876037d85c2d1e3e873bd.tar.bz2 scala-750465684a2aa5b8d24876037d85c2d1e3e873bd.zip |
Merge pull request #5535 from som-snytt/issue/9945
SI-9945 Don't warn imports in java units
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Contexts.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Contexts.scala b/src/compiler/scala/tools/nsc/typechecker/Contexts.scala index c73ea54c3d..8f0625e58c 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Contexts.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Contexts.scala @@ -60,7 +60,7 @@ trait Contexts { self: Analyzer => private lazy val allImportInfos = mutable.Map[CompilationUnit, List[ImportInfo]]() withDefaultValue Nil - def warnUnusedImports(unit: CompilationUnit) = { + def warnUnusedImports(unit: CompilationUnit) = if (!unit.isJava) { for (imps <- allImportInfos.remove(unit)) { for (imp <- imps.reverse.distinct) { val used = allUsedSelectors(imp) |