aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/typer/Typer.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2014-01-15 19:02:41 +0100
committerMartin Odersky <odersky@gmail.com>2014-01-15 19:02:41 +0100
commit24dff883751fb5a0920f8889e6570914a0f73a26 (patch)
treeea09fa0f75d4058396a6741edcfe8d1a897d6823 /src/dotty/tools/dotc/typer/Typer.scala
parentf1cfe733d9d02dff975d2bde222db890ca6d15e6 (diff)
downloaddotty-24dff883751fb5a0920f8889e6570914a0f73a26.tar.gz
dotty-24dff883751fb5a0920f8889e6570914a0f73a26.tar.bz2
dotty-24dff883751fb5a0920f8889e6570914a0f73a26.zip
Relax type checking rule for pattern matching.
Previously, if S is the selector type and P is the type of the unapply argument, we demanded either S <: P or P <: S We now also admit P <: S' where S' can be obtained from S by dropping refinements. This lets some patterns in RefinedPrinters typecheck which did not typecheck before. It seems we can afford to be a little bit more liberal here, and thereby approximate the weaker "isPopulated" criterion of Scala2x.
Diffstat (limited to 'src/dotty/tools/dotc/typer/Typer.scala')
0 files changed, 0 insertions, 0 deletions