summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/typechecker/TypeDiagnostics.scala
diff options
context:
space:
mode:
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/TypeDiagnostics.scala')
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/TypeDiagnostics.scala8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/TypeDiagnostics.scala b/src/compiler/scala/tools/nsc/typechecker/TypeDiagnostics.scala
index dfa1b6db0f..60346e7be1 100644
--- a/src/compiler/scala/tools/nsc/typechecker/TypeDiagnostics.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/TypeDiagnostics.scala
@@ -452,10 +452,10 @@ trait TypeDiagnostics {
val treeTypes = mutable.Set[Type]()
def defnSymbols = defnTrees.toList map (_.symbol)
- def localVars = defnSymbols filter (t => t.isLocal && t.isVar)
+ def localVars = defnSymbols filter (t => t.isLocalToBlock && t.isVar)
def qualifiesTerm(sym: Symbol) = (
- (sym.isModule || sym.isMethod || sym.isPrivateLocal || sym.isLocal)
+ (sym.isModule || sym.isMethod || sym.isPrivateLocal || sym.isLocalToBlock)
&& !nme.isLocalName(sym.name)
&& !sym.isParameter
&& !sym.isParamAccessor // could improve this, but it's a pain
@@ -499,12 +499,12 @@ trait TypeDiagnostics {
def isUnusedType(m: Symbol): Boolean = (
m.isType
&& !m.isTypeParameterOrSkolem // would be nice to improve this
- && (m.isPrivate || m.isLocal)
+ && (m.isPrivate || m.isLocalToBlock)
&& !(treeTypes.exists(tp => tp exists (t => t.typeSymbolDirect == m)))
)
def isUnusedTerm(m: Symbol): Boolean = (
(m.isTerm)
- && (m.isPrivate || m.isLocal)
+ && (m.isPrivate || m.isLocalToBlock)
&& !targets(m)
&& !(m.name == nme.WILDCARD) // e.g. val _ = foo
&& !ignoreNames(m.name.toTermName) // serialization methods