Slight tweak to positions of dealised terms. In particular we now find the right tree for Nil, rather than the tree for it's package prefix.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@18656 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
This commit is contained in:
milessabin 2009-09-07 22:57:54 +00:00
parent 5321d7611f
commit 5bca21e52f
1 changed files with 1 additions and 1 deletions

View File

@ -578,7 +578,7 @@ trait Typers { self: Analyzer =>
// fails to notice exhaustiveness and to generate good code when
// List extractors are mixed with :: patterns. See Test5 in lists.scala.
def dealias(sym: Symbol) =
(atPos(tree.pos) { gen.mkAttributedRef(sym) }, sym.owner.thisType)
({ val t = gen.mkAttributedRef(sym) ; t.setPos(tree.pos) ; t }, sym.owner.thisType)
sym.name match {
case nme.List => return dealias(ListModule)
case nme.Seq => return dealias(SeqModule)