From 0f3a903bebdac5eeaa84b2f8fdd0298bd15468f2 Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Sun, 19 Oct 2014 15:32:30 +0200 Subject: TreeTypeMap needs to map declarations of mapped classes ... and these mappings have to be part of the applied substitutions. Without the patch, the postCondition of FirstTransform fails for TreeInfo.scala and others, because it selects symbols which are not defined in the mapped class. Unrelated bugfix: JavaArray derives from Object. --- src/dotty/tools/dotc/core/Types.scala | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/dotty/tools/dotc/core/Types.scala') diff --git a/src/dotty/tools/dotc/core/Types.scala b/src/dotty/tools/dotc/core/Types.scala index d93e4eb09..33ce71ad3 100644 --- a/src/dotty/tools/dotc/core/Types.scala +++ b/src/dotty/tools/dotc/core/Types.scala @@ -116,6 +116,8 @@ object Types { tp.tp1.derivesFrom(cls) || tp.tp2.derivesFrom(cls) case tp: OrType => tp.tp1.derivesFrom(cls) && tp.tp2.derivesFrom(cls) + case tp: JavaArrayType => + cls == defn.ObjectClass case _ => false } -- cgit v1.2.3