aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core/Definitions.scala
diff options
context:
space:
mode:
authorDmitry Petrashko <dmitry.petrashko@gmail.com>2014-11-25 15:51:55 +0100
committerDmitry Petrashko <dmitry.petrashko@gmail.com>2014-12-16 13:14:59 +0100
commit7d470b3e8c09fffd8a5c42e2aa8b22479e087a3a (patch)
treea6827e22c6b2b4faf2ff205ed8f4120d20cc7b11 /src/dotty/tools/dotc/core/Definitions.scala
parent981a21816e4cb10b8fbe4edcf0659fb3995d63f8 (diff)
downloaddotty-7d470b3e8c09fffd8a5c42e2aa8b22479e087a3a.tar.gz
dotty-7d470b3e8c09fffd8a5c42e2aa8b22479e087a3a.tar.bz2
dotty-7d470b3e8c09fffd8a5c42e2aa8b22479e087a3a.zip
Sharing backend between scalac and dotty.
Due to a lot of error and workarounds required for backend not regress in terms of speed, I guess the original idea was to high to be reached.. Nevertheless it was good to try.
Diffstat (limited to 'src/dotty/tools/dotc/core/Definitions.scala')
-rw-r--r--src/dotty/tools/dotc/core/Definitions.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/core/Definitions.scala b/src/dotty/tools/dotc/core/Definitions.scala
index 19d175088..41cbc05d2 100644
--- a/src/dotty/tools/dotc/core/Definitions.scala
+++ b/src/dotty/tools/dotc/core/Definitions.scala
@@ -398,7 +398,7 @@ class Definitions {
def apply(elem: Type)(implicit ctx: Context) =
if (ctx.erasedTypes) JavaArrayType(elem)
else ArrayClass.typeRef.appliedTo(elem :: Nil)
- def unapply(tp: Type)(implicit ctx: Context) = tp.dealias match {
+ def unapply(tp: Type)(implicit ctx: Context): Option[Type] = tp.dealias match {
case at: RefinedType if (at isRef ArrayClass) && at.argInfos.length == 1 => Some(at.argInfos.head)
case _ => None
}