diff options
author | Eugene Burmako <xeno.by@gmail.com> | 2014-01-21 16:28:25 +0300 |
---|---|---|
committer | Eugene Burmako <xeno.by@gmail.com> | 2014-02-10 09:16:17 +0100 |
commit | 9eead7fdcec4c23df0276e004bd6b91297f8b18c (patch) | |
tree | a1eae21eec3242629ee6fa5979d710a3de761608 /src/compiler/scala/tools/nsc/typechecker/TypeDiagnostics.scala | |
parent | 3900e4bc7f20e453b8f09fa25ade3e39e60f00e2 (diff) | |
download | scala-9eead7fdcec4c23df0276e004bd6b91297f8b18c.tar.gz scala-9eead7fdcec4c23df0276e004bd6b91297f8b18c.tar.bz2 scala-9eead7fdcec4c23df0276e004bd6b91297f8b18c.zip |
standardizes checks for default getters
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/TypeDiagnostics.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/TypeDiagnostics.scala | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/TypeDiagnostics.scala b/src/compiler/scala/tools/nsc/typechecker/TypeDiagnostics.scala index b801b644fb..71e6454931 100644 --- a/src/compiler/scala/tools/nsc/typechecker/TypeDiagnostics.scala +++ b/src/compiler/scala/tools/nsc/typechecker/TypeDiagnostics.scala @@ -525,7 +525,6 @@ trait TypeDiagnostics { val unused = p.unusedTerms unused foreach { defn: DefTree => val sym = defn.symbol - val isDefaultGetter = sym.name containsName nme.DEFAULT_GETTER_STRING val pos = ( if (defn.pos.isDefined) defn.pos else if (sym.pos.isDefined) sym.pos @@ -536,7 +535,7 @@ trait TypeDiagnostics { ) val why = if (sym.isPrivate) "private" else "local" val what = ( - if (isDefaultGetter) "default argument" + if (sym.isDefaultGetter) "default argument" else if (sym.isConstructor) "constructor" else if (sym.isVar || sym.isGetter && sym.accessed.isVar) "var" else if (sym.isVal || sym.isGetter && sym.accessed.isVal) "val" |