Skip to content

Commit 632b0e4

Browse files
committed
Remove internal API usage from typeForClass
1 parent c50ca10 commit 632b0e4

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

scaladoc/src/dotty/tools/scaladoc/tasty/SyntheticSupport.scala

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,7 @@ object SyntheticsSupport:
6767
c.symbol.typeRef.baseClasses.map(b => b -> c.symbol.typeRef.baseType(b)).tail
6868

6969
def typeForClass(using Quotes)(c: reflect.ClassDef): reflect.TypeRepr =
70-
import reflect._
71-
import dotty.tools.dotc
72-
given dotc.core.Contexts.Context = quotes.asInstanceOf[scala.quoted.runtime.impl.QuotesImpl].ctx
73-
val cSym = c.symbol.asInstanceOf[dotc.core.Symbols.Symbol]
74-
cSym.typeRef.appliedTo(cSym.typeParams.map(_.typeRef)).asInstanceOf[TypeRepr]
70+
c.symbol.typeRef.appliedTo(c.symbol.typeMembers.filter(_.isTypeParam).map(_.typeRef))
7571

7672
def memberInfo(using Quotes)(c: reflect.ClassDef, symbol: reflect.Symbol): reflect.TypeRepr =
7773
import reflect._

0 commit comments

Comments
 (0)