summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2011-07-09 22:52:53 +0000
committerPaul Phillips <paulp@improving.org>2011-07-09 22:52:53 +0000
commit7d4cff1dc6040d951b09f8df4af288d16ef53de2 (patch)
tree58b1b24ca12011ec53004aa675ecd2fbacfc501f /src/compiler/scala/tools/nsc/typechecker/RefChecks.scala
parentf0169872c9453ab6c50c008b8426d3bca7d1c178 (diff)
downloadscala-7d4cff1dc6040d951b09f8df4af288d16ef53de2.tar.gz
scala-7d4cff1dc6040d951b09f8df4af288d16ef53de2.tar.bz2
scala-7d4cff1dc6040d951b09f8df4af288d16ef53de2.zip
Moved a warning behind -Xlint.
meant for --grep to look in checkfiles too, and now it does. No review.
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/RefChecks.scala')
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/RefChecks.scala10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala b/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala
index d4ec27a6c0..9ca70bbefb 100644
--- a/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala
@@ -116,10 +116,12 @@ abstract class RefChecks extends InfoTransform {
}
}
}
- clazz.info.decls filter (x => x.isImplicit && x.typeParams.nonEmpty) foreach { sym =>
- val alts = clazz.info.decl(sym.name).alternatives
- if (alts.size > 1)
- alts foreach (x => unit.warning(x.pos, "parameterized overloaded implicit methods are not visible as view bounds"))
+ if (settings.lint.value) {
+ clazz.info.decls filter (x => x.isImplicit && x.typeParams.nonEmpty) foreach { sym =>
+ val alts = clazz.info.decl(sym.name).alternatives
+ if (alts.size > 1)
+ alts foreach (x => unit.warning(x.pos, "parameterized overloaded implicit methods are not visible as view bounds"))
+ }
}
}