diff options
author | Paul Phillips <paulp@improving.org> | 2013-10-12 13:22:29 -0700 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2013-10-12 13:22:29 -0700 |
commit | 1a1c37ce3aa75193ecf7ef3e4089cd2305728695 (patch) | |
tree | 99a8fe22ffe900cc59f0674421afe323d0e48b85 /src/compiler/scala/tools/nsc/typechecker/Typers.scala | |
parent | 392d1ddb1588d69c2e8ae10a2b3e902c7229b772 (diff) | |
download | scala-1a1c37ce3aa75193ecf7ef3e4089cd2305728695.tar.gz scala-1a1c37ce3aa75193ecf7ef3e4089cd2305728695.tar.bz2 scala-1a1c37ce3aa75193ecf7ef3e4089cd2305728695.zip |
Convenience method findSymbol.
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/Typers.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Typers.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Typers.scala b/src/compiler/scala/tools/nsc/typechecker/Typers.scala index 7bf342f475..6dadb3100f 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Typers.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Typers.scala @@ -3418,7 +3418,7 @@ trait Typers extends Adaptations with Tags with TypersTracking with PatternTyper val nvPairs = args map { case arg @ AssignOrNamedArg(Ident(name), rhs) => val sym = if (isJava) annScope.lookup(name) - else typedFun.tpe.params.find(p => p.name == name).getOrElse(NoSymbol) + else findSymbol(typedFun.tpe.params)(_.name == name) if (sym == NoSymbol) { reportAnnotationError(UnknownAnnotationNameError(arg, name)) (nme.ERROR, None) |