Skip to content

Commit af1b4a0

Browse files
Merge pull request #9851 from gzoller/issue_9850
Expose ofErasedClass in Reflection
2 parents 9d09f69 + 833509e commit af1b4a0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

library/src/scala/tasty/Reflection.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1353,6 +1353,8 @@ trait Reflection extends reflect.Types { reflectSelf: CompilerInterface =>
13531353
def of[T <: AnyKind](using qtype: scala.quoted.Type[T]): Type =
13541354
qtype.asInstanceOf[scala.internal.quoted.Type[TypeTree]].typeTree.tpe
13551355

1356+
def typeConstructorOf(clazz: Class[_]): Type =
1357+
reflectSelf.Type_ofErasedClass(clazz)
13561358
end Type
13571359

13581360
given TypeOps as AnyRef:

0 commit comments

Comments
 (0)