diff options
author | Martin Odersky <odersky@gmail.com> | 2014-01-15 19:02:41 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2014-01-15 19:02:41 +0100 |
commit | 24dff883751fb5a0920f8889e6570914a0f73a26 (patch) | |
tree | ea09fa0f75d4058396a6741edcfe8d1a897d6823 /tests/pos/typers.scala | |
parent | f1cfe733d9d02dff975d2bde222db890ca6d15e6 (diff) | |
download | dotty-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 'tests/pos/typers.scala')
0 files changed, 0 insertions, 0 deletions