diff options
author | Martin Odersky <odersky@gmail.com> | 2015-11-15 19:17:40 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2015-11-17 21:30:20 +0100 |
commit | b02c80c2c240b58e8030d2ccf7dc7d7a36b3afe9 (patch) | |
tree | 50ab63f3a7b9d853713c23387e60f4b4410a0180 /src/dotty/tools/dotc/typer/TypeAssigner.scala | |
parent | eefa6112cc2c9e26dfd22bbc7532332d71aa6b43 (diff) | |
download | dotty-b02c80c2c240b58e8030d2ccf7dc7d7a36b3afe9.tar.gz dotty-b02c80c2c240b58e8030d2ccf7dc7d7a36b3afe9.tar.bz2 dotty-b02c80c2c240b58e8030d2ccf7dc7d7a36b3afe9.zip |
Fix #938 - escaping reference.
Need to avoid also symbols in ThisTypes
Diffstat (limited to 'src/dotty/tools/dotc/typer/TypeAssigner.scala')
-rw-r--r-- | src/dotty/tools/dotc/typer/TypeAssigner.scala | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/dotty/tools/dotc/typer/TypeAssigner.scala b/src/dotty/tools/dotc/typer/TypeAssigner.scala index af5fdd428..f7cda1ef6 100644 --- a/src/dotty/tools/dotc/typer/TypeAssigner.scala +++ b/src/dotty/tools/dotc/typer/TypeAssigner.scala @@ -46,10 +46,9 @@ trait TypeAssigner { // TODO: measure the cost of using `existsPart`, and if necessary replace it // by a `TypeAccumulator` where we have set `stopAtStatic = true`. tp existsPart { - case tp: NamedType => - forbidden contains tp.symbol - case _ => - false + case tp: NamedType => forbidden contains tp.symbol + case tp: ThisType => forbidden contains tp.cls + case _ => false } def apply(tp: Type): Type = tp match { case tp: TermRef if toAvoid(tp) && variance > 0 => |