From d21310b8baa847f1b0cd14986f8ec1084b59e6fe Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Fri, 19 Dec 2014 18:56:03 +0100 Subject: Fix isUnboundedGeneric for alias types. Fixes problem in test case SI-7638a.scala which gave an override error before. --- src/dotty/tools/dotc/TypeErasure.scala | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/dotty/tools') diff --git a/src/dotty/tools/dotc/TypeErasure.scala b/src/dotty/tools/dotc/TypeErasure.scala index a9ae34213..3ddd10595 100644 --- a/src/dotty/tools/dotc/TypeErasure.scala +++ b/src/dotty/tools/dotc/TypeErasure.scala @@ -160,11 +160,11 @@ object TypeErasure { * as upper bound and that is not Java defined? Arrays of such types are * erased to `Object` instead of `ObjectArray`. */ - def isUnboundedGeneric(tp: Type)(implicit ctx: Context): Boolean = tp match { + def isUnboundedGeneric(tp: Type)(implicit ctx: Context): Boolean = tp.dealias match { case tp: TypeRef => - tp.symbol.isAbstractType && + !tp.symbol.isClass && !tp.derivesFrom(defn.ObjectClass) && - !tp.typeSymbol.is(JavaDefined) + !tp.symbol.is(JavaDefined) case tp: PolyParam => !tp.derivesFrom(defn.ObjectClass) && !tp.binder.resultType.isInstanceOf[JavaMethodType] -- cgit v1.2.3