From 40c388aa948807d893837937c6fdaa313c556f8f Mon Sep 17 00:00:00 2001 From: Eugene Burmako Date: Mon, 17 Sep 2012 15:09:11 +0200 Subject: Reflection no longer produces faux existentials Because of using plain ExistentialType factory of a case class typeToScala sometimes returned existentials with empty quantifieds. Changing ExistentialType to newExistentialType, which simply returns the underlying types if params are empty, fixed the problem. --- test/files/run/reflection-java-crtp.check | 2 +- test/files/run/reflection-java-crtp.scala | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'test') diff --git a/test/files/run/reflection-java-crtp.check b/test/files/run/reflection-java-crtp.check index 0f30b453c0..9fd305a7af 100644 --- a/test/files/run/reflection-java-crtp.check +++ b/test/files/run/reflection-java-crtp.check @@ -14,7 +14,7 @@ scala> // make sure that the E's in Enum> are represented scala> val e1 = enum.typeParams(0).asType e1: reflect.runtime.universe.TypeSymbol = type E -scala> val TypeBounds(_, ExistentialType(_, TypeRef(_, _, List(TypeRef(_, e2: TypeSymbol, _))))) = e1.typeSignature +scala> val TypeBounds(_, TypeRef(_, _, List(TypeRef(_, e2: TypeSymbol, _)))) = e1.typeSignature e2: reflect.runtime.universe.TypeSymbol = type E scala> println(e1 eq e2) diff --git a/test/files/run/reflection-java-crtp.scala b/test/files/run/reflection-java-crtp.scala index 87c7972d87..1b08b3c6bb 100644 --- a/test/files/run/reflection-java-crtp.scala +++ b/test/files/run/reflection-java-crtp.scala @@ -7,7 +7,7 @@ object Test extends ReplTest { val enum = typeOf[SimpleEnumeration].baseClasses(1).asClass // make sure that the E's in Enum> are represented by the same symbol val e1 = enum.typeParams(0).asType - val TypeBounds(_, ExistentialType(_, TypeRef(_, _, List(TypeRef(_, e2: TypeSymbol, _))))) = e1.typeSignature + val TypeBounds(_, TypeRef(_, _, List(TypeRef(_, e2: TypeSymbol, _)))) = e1.typeSignature println(e1 eq e2) """ -- cgit v1.2.3