Skip to content

As i566 shows, it is possible to have a package as prefix, a package #575

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 15, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions src/dotty/tools/dotc/transform/PostTyper.scala
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,11 @@ class PostTyper extends MacroTransform with IdentityDenotTransformer { thisTran
private def transformAnnots(tree: MemberDef)(implicit ctx: Context): Unit =
tree.symbol.transformAnnotations(transformAnnot)

private def transformSelect(tree: Select, targs: List[Tree])(implicit ctx: Context) = {
private def transformSelect(tree: Select, targs: List[Tree])(implicit ctx: Context): Tree = {
val qual = tree.qualifier
qual.symbol.moduleClass.denot match {
case pkg: PackageClassDenotation if !tree.symbol.maybeOwner.is(Package) =>
assert(targs.isEmpty)
cpy.Select(tree)(qual select pkg.packageObj.symbol, tree.name)
transformSelect(cpy.Select(tree)(qual select pkg.packageObj.symbol, tree.name), targs)
case _ =>
superAcc.transformSelect(super.transform(tree), targs)
}
Expand Down
5 changes: 5 additions & 0 deletions tests/pos/i566.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
object Test {
type T = String
type U
reflect.classTag[T]
}