From 97d89afc4769c4badb42284c9b5d97b663f870f6 Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Mon, 25 Aug 2014 19:13:34 +0200 Subject: 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. --- src/dotty/tools/dotc/core/Definitions.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/dotty/tools/dotc/core/Definitions.scala') 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 } -- cgit v1.2.3