diff options
author | Konstantin Fedorov <kfeodorov@MacBook-Pro-Konstantin.local> | 2014-09-08 09:51:41 +0400 |
---|---|---|
committer | Konstantin Fedorov <kfeodorov@MacBook-Pro-Konstantin.local> | 2014-09-10 19:09:34 +0400 |
commit | 24ccfa05bb9af066fe91f182c5f95de837139f0b (patch) | |
tree | 45472ef805288fe939937ba2aca4af8d594c654d /src/compiler/scala/tools/nsc/typechecker/TypeDiagnostics.scala | |
parent | 2ac6dc03088ecec871838d23aeb688d0e3d4eefb (diff) | |
download | scala-24ccfa05bb9af066fe91f182c5f95de837139f0b.tar.gz scala-24ccfa05bb9af066fe91f182c5f95de837139f0b.tar.bz2 scala-24ccfa05bb9af066fe91f182c5f95de837139f0b.zip |
SI-8398 - unused warning reports lazy val as a method
Compiler internals treat lazy vals as methods. Therefore, we need to have a special case for them when assembling the warning message.
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/TypeDiagnostics.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/TypeDiagnostics.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/TypeDiagnostics.scala b/src/compiler/scala/tools/nsc/typechecker/TypeDiagnostics.scala index 8d29d28908..1dac27639c 100644 --- a/src/compiler/scala/tools/nsc/typechecker/TypeDiagnostics.scala +++ b/src/compiler/scala/tools/nsc/typechecker/TypeDiagnostics.scala @@ -532,7 +532,7 @@ trait TypeDiagnostics { 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" + else if (sym.isVal || sym.isGetter && sym.accessed.isVal || sym.isLazy) "val" else if (sym.isSetter) "setter" else if (sym.isMethod) "method" else if (sym.isModule) "object" |