Fix #239 - handling of package objects

References to `.package` are now also inserted if the
accessed member comes from a class inherited by a package
object.

Closes #239 

Review by @retronym 
On Mon, Dec 15, 2014 at 12:43 AM, Jason Zaugg <notifications@github.com>
wrote:
>
> In src/dotty/tools/dotc/transform/FirstTransform.scala
> <https://github.com/lampepfl/dotty/pull/282#discussion-diff-21800912>:
>
> > @@ -124,7 +124,7 @@ class FirstTransform extends MiniPhaseTransform with IdentityDenotTransformer wi
> >      normalizeType {
> >        val qual = tree.qualifier
> >        qual.symbol.moduleClass.denot match {
> > -        case pkg: PackageClassDenotation if tree.symbol.maybeOwner.isPackageObject =>
> > +        case pkg: PackageClassDenotation if !tree.symbol.maybeOwner.is(Package) =>
> >            cpy.Select(tree)(qual select pkg.packageObj.symbol, tree.name)
>
> Does this assign a position to Select(qual, TermName("package"))?
>
> Yes, it's the position of `qual`.

 - Martin


> —
> Reply to this email directly or view it on GitHub
> <https://github.com/lampepfl/dotty/pull/282/files#r21800912>.
>


-- 
Martin Odersky
EPFL