aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/typer/Typer.scala
diff options
context:
space:
mode:
authorGuillaume Martres <smarter@ubuntu.com>2015-08-05 22:07:49 +0200
committerGuillaume Martres <smarter@ubuntu.com>2016-03-24 16:22:06 +0100
commite7dc46fc2ee685708af566a78fa97f7faccd5dcd (patch)
tree1d8129476ad88779dc0ad8f30a181c03d49db30e /src/dotty/tools/dotc/typer/Typer.scala
parent1b29119b8ed1a2c3b382dfca01d6dde71f6ae733 (diff)
downloaddotty-e7dc46fc2ee685708af566a78fa97f7faccd5dcd.tar.gz
dotty-e7dc46fc2ee685708af566a78fa97f7faccd5dcd.tar.bz2
dotty-e7dc46fc2ee685708af566a78fa97f7faccd5dcd.zip
Typer#escapingRefs: don't let the types of lower bounds escape
In 0efa171e8ccca0d49fc6d800fd21e29f7b7336fd I changed the definition of NamedPartsAccumulator to exclude lower bounds as this is required for the implicit search, but NamedPartsAccumulator is also used by Typer#escapingRefs so in the following code: class Foo[T] val z = { class C ??? : Foo[_ >: C] } the type of z was inferred to be Foo[_ >: C] instead of Foo. To avoid this, NamedPartsAccumulator will only exclude lower bounds if the parameter excludeLowerBounds is explicitely set to true. No test because there is no way to detect that a type has escaped, this might be something that could be added to TreeChecker.
Diffstat (limited to 'src/dotty/tools/dotc/typer/Typer.scala')
0 files changed, 0 insertions, 0 deletions