diff options
author | Adriaan Moors <adriaan@lightbend.com> | 2017-02-14 17:00:17 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-14 17:00:17 -0800 |
commit | 4ae37504ca1df877780afac437795afb402cae6c (patch) | |
tree | bd3932c636933d43cfa3b6229ccae1a0e3c21698 /src/compiler | |
parent | ed9352a43a14e5e4175ce987112318e588c4695b (diff) | |
parent | 1d41aef53506a4e697f848e790e03f204d05885d (diff) | |
download | scala-4ae37504ca1df877780afac437795afb402cae6c.tar.gz scala-4ae37504ca1df877780afac437795afb402cae6c.tar.bz2 scala-4ae37504ca1df877780afac437795afb402cae6c.zip |
Merge pull request #5654 from retronym/ticket/10154
SI-10154 Fix implicit search regression for term-owned objects
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Contexts.scala | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Contexts.scala b/src/compiler/scala/tools/nsc/typechecker/Contexts.scala index fde2f7bb03..d349597b14 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Contexts.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Contexts.scala @@ -1194,7 +1194,8 @@ trait Contexts { self: Analyzer => } final def lookupCompanionOf(original: Symbol): Symbol = { - lookupScopeEntry(original) match { + if (original.isModuleClass) original.sourceModule + else lookupScopeEntry(original) match { case null => NoSymbol case entry => entry.owner.lookupCompanion(original) } |