diff options
author | Martin Odersky <odersky@gmail.com> | 2014-12-10 18:53:45 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2014-12-10 18:53:45 +0100 |
commit | 176d677258051fd1eef1d1bf26575919cab03530 (patch) | |
tree | 77b485229b9c682e1437a3672b89f4802ffa1d8c /src/dotty/tools/dotc/core/TypeOps.scala | |
parent | db48496502eb1d86f54365b5a815e45a52f4819d (diff) | |
download | dotty-176d677258051fd1eef1d1bf26575919cab03530.tar.gz dotty-176d677258051fd1eef1d1bf26575919cab03530.tar.bz2 dotty-176d677258051fd1eef1d1bf26575919cab03530.zip |
Converted some TypeBounds pattern matches to TypeAlias matches.
Replace all
case TypeBounds(lo, hi) if lo eq hi =>
patterns with
case TypeAlias(alias) =>
Diffstat (limited to 'src/dotty/tools/dotc/core/TypeOps.scala')
-rw-r--r-- | src/dotty/tools/dotc/core/TypeOps.scala | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/dotty/tools/dotc/core/TypeOps.scala b/src/dotty/tools/dotc/core/TypeOps.scala index 7b76feb4d..8bda49c94 100644 --- a/src/dotty/tools/dotc/core/TypeOps.scala +++ b/src/dotty/tools/dotc/core/TypeOps.scala @@ -142,9 +142,10 @@ trait TypeOps { this: Context => def needsChecking(tp: Type, isPart: Boolean): Boolean = tp match { case tp: TypeRef => tp.info match { + case TypeAlias(alias) => + needsChecking(alias, isPart) case TypeBounds(lo, hi) => - if (lo eq hi) needsChecking(hi, isPart) - else isPart || tp.controlled(isVolatile(hi)) + isPart || tp.controlled(isVolatile(hi)) case _ => false } case tp: RefinedType => |