diff options
author | Martin Odersky <odersky@gmail.com> | 2015-09-29 17:33:09 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2015-09-29 19:19:31 +0200 |
commit | 5b07f556ebb1e87d5b5c87c6375fa33c29c9a72d (patch) | |
tree | 01a1f22becd246dc494ef398c7980fcc9f2c16fd /src/dotty/tools/dotc/core/Types.scala | |
parent | 9c8e247d8900f3fb6f497bc5e269b68f6bc967b7 (diff) | |
download | dotty-5b07f556ebb1e87d5b5c87c6375fa33c29c9a72d.tar.gz dotty-5b07f556ebb1e87d5b5c87c6375fa33c29c9a72d.tar.bz2 dotty-5b07f556ebb1e87d5b5c87c6375fa33c29c9a72d.zip |
Eliminate Config.newMatch option
With the new approach to matching it is no longer sound.
We always have to match infos anyway to be sure.
Diffstat (limited to 'src/dotty/tools/dotc/core/Types.scala')
-rw-r--r-- | src/dotty/tools/dotc/core/Types.scala | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/dotty/tools/dotc/core/Types.scala b/src/dotty/tools/dotc/core/Types.scala index e545066af..c35b9a35a 100644 --- a/src/dotty/tools/dotc/core/Types.scala +++ b/src/dotty/tools/dotc/core/Types.scala @@ -647,12 +647,9 @@ object Types { * (*) when matching with a Java method, we also regard Any and Object as equivalent * parameter types. */ - def matches(that: Type)(implicit ctx: Context): Boolean = - if (Config.newMatch) this.signature matches that.signature - else track("matches") { - ctx.typeComparer.matchesType( - this, that, relaxed = !ctx.phase.erasedTypes) - } + def matches(that: Type)(implicit ctx: Context): Boolean = track("matches") { + ctx.typeComparer.matchesType(this, that, relaxed = !ctx.phase.erasedTypes) + } /** This is the same as `matches` except that it also matches => T with T and * vice versa. |