aboutsummaryrefslogtreecommitdiff
path: root/src/dotty
diff options
context:
space:
mode:
authorFelix Mulder <felix.mulder@gmail.com>2016-09-02 14:56:35 +0200
committerMartin Odersky <odersky@gmail.com>2016-10-02 16:11:21 +0200
commita75fee22fdff75dd9ebc2faa008e0ec9a82af1fb (patch)
tree4bf57f1929d39373023d7a857c2389487de95e38 /src/dotty
parent6f9f29e1f90c017f30a81b0e37f994b5b8cd8507 (diff)
downloaddotty-a75fee22fdff75dd9ebc2faa008e0ec9a82af1fb.tar.gz
dotty-a75fee22fdff75dd9ebc2faa008e0ec9a82af1fb.tar.bz2
dotty-a75fee22fdff75dd9ebc2faa008e0ec9a82af1fb.zip
Don't expand stat before recursion in namer
Dottydoc needs the unexpanded trees so that it can have access to the attached docstring
Diffstat (limited to 'src/dotty')
-rw-r--r--src/dotty/tools/dotc/typer/Namer.scala4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/dotty/tools/dotc/typer/Namer.scala b/src/dotty/tools/dotc/typer/Namer.scala
index 4dff02018..c6ff64d8d 100644
--- a/src/dotty/tools/dotc/typer/Namer.scala
+++ b/src/dotty/tools/dotc/typer/Namer.scala
@@ -404,7 +404,7 @@ class Namer { typer: Typer =>
* enter them into symbol table
*/
def indexExpanded(stat: Tree)(implicit ctx: Context): Context = {
- def recur(stat: Tree): Context = stat match {
+ def recur(stat: Tree): Context = expanded(stat) match {
case pcl: PackageDef =>
val pkg = createPackageSymbol(pcl.pid)
index(pcl.stats)(ctx.fresh.setOwner(pkg.moduleClass))
@@ -424,7 +424,7 @@ class Namer { typer: Typer =>
case _ =>
ctx
}
- recur(expanded(stat))
+ recur(stat)
}
/** Determines whether this field holds an enum constant.