From 18af4c7a282a48cafdf5b79f312d15e3d162361a Mon Sep 17 00:00:00 2001 From: gzoller Date: Tue, 22 Sep 2020 19:20:24 -0500 Subject: [PATCH 1/2] Expose ofErasedClass in Reflection --- library/src/scala/tasty/Reflection.scala | 2 ++ 1 file changed, 2 insertions(+) diff --git a/library/src/scala/tasty/Reflection.scala b/library/src/scala/tasty/Reflection.scala index 97cbbf6206b9..a6713fede8f2 100644 --- a/library/src/scala/tasty/Reflection.scala +++ b/library/src/scala/tasty/Reflection.scala @@ -1353,6 +1353,8 @@ trait Reflection extends reflect.Types { reflectSelf: CompilerInterface => def of[T <: AnyKind](using qtype: scala.quoted.Type[T]): Type = qtype.asInstanceOf[scala.internal.quoted.Type[TypeTree]].typeTree.tpe + def ofErasedClass(clazz: Class[_]): Type = + reflectSelf.Type_ofErasedClass(clazz) end Type given TypeOps as AnyRef: From 833509e6f966a3e5e3fbdbdb641e70625403383d Mon Sep 17 00:00:00 2001 From: Greg Zoller Date: Wed, 23 Sep 2020 09:18:48 -0500 Subject: [PATCH 2/2] Update library/src/scala/tasty/Reflection.scala Co-authored-by: Nicolas Stucki --- library/src/scala/tasty/Reflection.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/src/scala/tasty/Reflection.scala b/library/src/scala/tasty/Reflection.scala index a6713fede8f2..9d7097a85c1d 100644 --- a/library/src/scala/tasty/Reflection.scala +++ b/library/src/scala/tasty/Reflection.scala @@ -1353,7 +1353,7 @@ trait Reflection extends reflect.Types { reflectSelf: CompilerInterface => def of[T <: AnyKind](using qtype: scala.quoted.Type[T]): Type = qtype.asInstanceOf[scala.internal.quoted.Type[TypeTree]].typeTree.tpe - def ofErasedClass(clazz: Class[_]): Type = + def typeConstructorOf(clazz: Class[_]): Type = reflectSelf.Type_ofErasedClass(clazz) end Type