diff options
author | James Iry <jamesiry@gmail.com> | 2013-02-11 11:11:00 -0800 |
---|---|---|
committer | James Iry <jamesiry@gmail.com> | 2013-02-11 11:11:00 -0800 |
commit | 08e547ffd2214c696cffec10ac721051bba98fca (patch) | |
tree | 66d816b71e1b5cc62d0e13d9e627fe733ae92027 /src | |
parent | 8bf9bbf557c2ce0778327f82e4599ddea97a3da8 (diff) | |
parent | 451cab967a332773c2027ada7553d5d59c0dc4b1 (diff) | |
download | scala-08e547ffd2214c696cffec10ac721051bba98fca.tar.gz scala-08e547ffd2214c696cffec10ac721051bba98fca.tar.bz2 scala-08e547ffd2214c696cffec10ac721051bba98fca.zip |
Merge pull request #2098 from retronym/ticket/6225
SI-6225 Fix import of inherited package object implicits
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Contexts.scala | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Contexts.scala b/src/compiler/scala/tools/nsc/typechecker/Contexts.scala index 620665126e..f2a2ef4d61 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Contexts.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Contexts.scala @@ -644,7 +644,14 @@ trait Contexts { self: Analyzer => new ImplicitInfo(sym.name, pre, sym) private def collectImplicitImports(imp: ImportInfo): List[ImplicitInfo] = { - val pre = imp.qual.tpe + val qual = imp.qual + + val pre = + if (qual.tpe.typeSymbol.isPackageClass) + // SI-6225 important if the imported symbol is inherited by the the package object. + singleType(qual.tpe, qual.tpe member nme.PACKAGE) + else + qual.tpe def collect(sels: List[ImportSelector]): List[ImplicitInfo] = sels match { case List() => List() |