diff options
author | odersky <odersky@gmail.com> | 2014-12-18 16:34:57 +0100 |
---|---|---|
committer | odersky <odersky@gmail.com> | 2014-12-18 16:34:57 +0100 |
commit | 83c3f7a64899011fa1260bc699ca06728173bc50 (patch) | |
tree | b5ce591a0f55709a83bd765dc156f7bcb5027020 /src/dotty/tools/dotc/core | |
parent | e0bf1758ac32d69cf97d28f449cc0400755e3914 (diff) | |
parent | 341f3370310251471903314bb5a75a4176f8afc7 (diff) | |
download | dotty-83c3f7a64899011fa1260bc699ca06728173bc50.tar.gz dotty-83c3f7a64899011fa1260bc699ca06728173bc50.tar.bz2 dotty-83c3f7a64899011fa1260bc699ca06728173bc50.zip |
Merge pull request #307 from smarter/simplify/TypeAlias-unapply
Simplify TypeAlias#unapply
Diffstat (limited to 'src/dotty/tools/dotc/core')
-rw-r--r-- | src/dotty/tools/dotc/core/Types.scala | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/dotty/tools/dotc/core/Types.scala b/src/dotty/tools/dotc/core/Types.scala index a1ca7796f..141b29ab7 100644 --- a/src/dotty/tools/dotc/core/Types.scala +++ b/src/dotty/tools/dotc/core/Types.scala @@ -2515,10 +2515,7 @@ object Types { object TypeAlias { def apply(alias: Type, variance: Int = 0)(implicit ctx: Context) = ctx.uniqueTypeAliases.enterIfNew(alias, variance) - def unapply(tp: TypeAlias): Option[Type] = tp match { - case tp: TypeAlias => Some(tp.alias) - case _ => None - } + def unapply(tp: TypeAlias): Option[Type] = Some(tp.alias) } // ----- Annotated and Import types ----------------------------------------------- |