summaryrefslogtreecommitdiff
path: root/src/compiler
diff options
context:
space:
mode:
authorJason Zaugg <jzaugg@gmail.com>2013-04-21 15:00:30 -0700
committerJason Zaugg <jzaugg@gmail.com>2013-04-21 15:00:30 -0700
commite8b37c79ca0535da56f852d922c1f88c3fd0e005 (patch)
tree56b84ab76b941abaaff35500ac1d61fc191859d1 /src/compiler
parentdf7cf4f3d9c35949436038728850927e782e587b (diff)
parent8556ca04c466cd7f7412465f02c52b764104f736 (diff)
downloadscala-e8b37c79ca0535da56f852d922c1f88c3fd0e005.tar.gz
scala-e8b37c79ca0535da56f852d922c1f88c3fd0e005.tar.bz2
scala-e8b37c79ca0535da56f852d922c1f88c3fd0e005.zip
Merge pull request #2410 from paulp/pr/parameterized-implicit
Quiet down overloaded implicit warning.
Diffstat (limited to 'src/compiler')
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/RefChecks.scala9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala b/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala
index b9fdd7280e..9a9ca6a654 100644
--- a/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala
@@ -135,7 +135,8 @@ abstract class RefChecks extends InfoTransform with scala.reflect.internal.trans
}
if (settings.lint.value) {
clazz.info.decls filter (x => x.isImplicit && x.typeParams.nonEmpty) foreach { sym =>
- val alts = clazz.info.decl(sym.name).alternatives
+ // implicit classes leave both a module symbol and a method symbol as residue
+ val alts = clazz.info.decl(sym.name).alternatives filterNot (_.isModule)
if (alts.size > 1)
alts foreach (x => unit.warning(x.pos, "parameterized overloaded implicit methods are not visible as view bounds"))
}
@@ -1373,12 +1374,12 @@ abstract class RefChecks extends InfoTransform with scala.reflect.internal.trans
*/
private def checkMigration(sym: Symbol, pos: Position) = {
if (sym.hasMigrationAnnotation) {
- val changed = try
+ val changed = try
settings.Xmigration.value < ScalaVersion(sym.migrationVersion.get)
catch {
- case e : NumberFormatException =>
+ case e : NumberFormatException =>
unit.warning(pos, s"${sym.fullLocationString} has an unparsable version number: ${e.getMessage()}")
- // if we can't parse the format on the migration annotation just conservatively assume it changed
+ // if we can't parse the format on the migration annotation just conservatively assume it changed
true
}
if (changed)