diff options
author | Martin Odersky <odersky@gmail.com> | 2014-08-25 19:13:34 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2014-08-25 22:54:06 +0200 |
commit | 97d89afc4769c4badb42284c9b5d97b663f870f6 (patch) | |
tree | d95868e077a2d701741b64be601fc53585c65493 /src/dotty/tools/dotc/core/Definitions.scala | |
parent | 254665e42f2a22ba271c2eb64cb8b1b06a7eaa5c (diff) | |
download | dotty-97d89afc4769c4badb42284c9b5d97b663f870f6.tar.gz dotty-97d89afc4769c4badb42284c9b5d97b663f870f6.tar.bz2 dotty-97d89afc4769c4badb42284c9b5d97b663f870f6.zip |
Fixes to erasure
Makes erasure pass the test suite.
Erasure is not yet turned turned on by default, because TestNonCyclic fails
with a stale symbol error. The problem is that This types are coupled to Symbols
and therefore don't reload. This is a problem is This types refer to static symbols
that get recompiled. We either have to drop using This types for static references,
or redefine thme so that can be reloaded.
Diffstat (limited to 'src/dotty/tools/dotc/core/Definitions.scala')
-rw-r--r-- | src/dotty/tools/dotc/core/Definitions.scala | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/dotty/tools/dotc/core/Definitions.scala b/src/dotty/tools/dotc/core/Definitions.scala index 9018d4015..304d9853c 100644 --- a/src/dotty/tools/dotc/core/Definitions.scala +++ b/src/dotty/tools/dotc/core/Definitions.scala @@ -377,9 +377,9 @@ class Definitions { } object ArrayType { - def apply(elem: Type) = + def apply(elem: Type)(implicit ctx: Context) = ArrayClass.typeRef.appliedTo(elem :: Nil) - def unapply(tp: Type) = tp.dealias match { + def unapply(tp: Type)(implicit ctx: Context) = tp.dealias match { case at: RefinedType if (at isRef ArrayClass) && at.argInfos.length == 1 => Some(at.argInfos.head) case _ => None } |