diff options
author | Martin Odersky <odersky@gmail.com> | 2013-12-29 18:36:18 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2013-12-29 18:36:18 +0100 |
commit | 0553f08eaeee1f9ac7ef6c28b341a92e0fb452e3 (patch) | |
tree | 497e40b6b4c6ee37f7a24259296a15d50371fd91 /src/dotty/tools/dotc/typer/Applications.scala | |
parent | 3f39cd8e15c321cf6ac97a0137087f7c2d69ce60 (diff) | |
download | dotty-0553f08eaeee1f9ac7ef6c28b341a92e0fb452e3.tar.gz dotty-0553f08eaeee1f9ac7ef6c28b341a92e0fb452e3.tar.bz2 dotty-0553f08eaeee1f9ac7ef6c28b341a92e0fb452e3.zip |
Tightening of position handlng
1) endPos works now even for NoPosition.
2) On the other hand, there's an assertion in Typer.typed which requires every non-empty tree that's type checked in a globally committable context to have a defined position.
Some fixes were needed to make the tests pass the new assert.
Diffstat (limited to 'src/dotty/tools/dotc/typer/Applications.scala')
-rw-r--r-- | src/dotty/tools/dotc/typer/Applications.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/typer/Applications.scala b/src/dotty/tools/dotc/typer/Applications.scala index aa2227d63..2c1384524 100644 --- a/src/dotty/tools/dotc/typer/Applications.scala +++ b/src/dotty/tools/dotc/typer/Applications.scala @@ -562,7 +562,7 @@ trait Applications extends Compatibility { self: Typer => ttree.tpe match { case alias: TypeRef if alias.symbol.isAliasType => companionRef(alias) match { - case companion: TermRef => return untpd.ref(companion) + case companion: TermRef => return untpd.ref(companion) withPos tree.pos case _ => } case _ => |