summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/typechecker/Typers.scala
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2009-10-22 01:01:04 +0000
committerPaul Phillips <paulp@improving.org>2009-10-22 01:01:04 +0000
commit3bd3ae75dae560a307c818515d79a0a4ebe67d41 (patch)
treeeb6e09c1eabf3feaf63c5490759798b3b6830515 /src/compiler/scala/tools/nsc/typechecker/Typers.scala
parentdc64c686606f8dde6be4d5ff185806331c693842 (diff)
downloadscala-3bd3ae75dae560a307c818515d79a0a4ebe67d41.tar.gz
scala-3bd3ae75dae560a307c818515d79a0a4ebe67d41.tar.bz2
scala-3bd3ae75dae560a307c818515d79a0a4ebe67d41.zip
Another warning for -Xstrict-warnings.
beloved try/catch blocks which swallow all comers. Realized that two warnings are already one too many to combine under a single option, and broke them out into individual options.
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/Typers.scala')
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/Typers.scala4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Typers.scala b/src/compiler/scala/tools/nsc/typechecker/Typers.scala
index b81c087901..269e9ca938 100644
--- a/src/compiler/scala/tools/nsc/typechecker/Typers.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/Typers.scala
@@ -1651,7 +1651,7 @@ trait Typers { self: Analyzer =>
// catches method parameters shadowing identifiers declared in the same file, so more
// work is needed. Most of the code here is to filter out false positives.
def isAuxConstructor(sym: Symbol) = sym.isConstructor && !sym.isPrimaryConstructor
- if (settings.Xwarnings.value && !isAuxConstructor(ddef.symbol)) {
+ if (settings.YwarnShadow.value && !isAuxConstructor(ddef.symbol)) {
for (v <- ddef.vparamss.flatten ; if v.symbol != null && !(v.symbol hasFlag SYNTHETIC))
checkShadowings(v, (sym => !sym.isDeferred && !sym.isMethod))
}
@@ -1752,7 +1752,7 @@ trait Typers { self: Analyzer =>
while ((e ne null) && (e.sym ne stat.symbol)) e = e.tail
if (e eq null) context.scope.enter(stat.symbol)
}
- if (settings.Xwarnings.value) checkShadowings(stat)
+ if (settings.YwarnShadow.value) checkShadowings(stat)
enterLabelDef(stat)
}
val stats1 = typedStats(block.stats, context.owner)