@@ -14,17 +14,17 @@ trait TypesSupport:
1414 inner(tpeTree.tpe)
1515 case other => None
1616
17- def inner (tpe : Type ): Option [Symbol ] = tpe match
17+ def inner (tpe : TypeRepr ): Option [Symbol ] = tpe match
1818 case ThisType (tpe) => inner(tpe)
1919 case AnnotatedType (tpe, _) => inner(tpe)
2020 case AppliedType (tpe, _) => inner(tpe)
2121 case tp @ TermRef (qual, typeName) =>
2222 qual match
23- case _ : Type | _ : NoPrefix => Some (tp.termSymbol)
23+ case _ : TypeRepr | _ : NoPrefix => Some (tp.termSymbol)
2424 case other => None
2525 case tp @ TypeRef (qual, typeName) =>
2626 qual match
27- case _ : Type | _ : NoPrefix => Some (tp.typeSymbol)
27+ case _ : TypeRepr | _ : NoPrefix => Some (tp.typeSymbol)
2828 case other => None
2929
3030 val typeSymbol = extractTypeSymbol(method.returnTpt)
@@ -46,7 +46,7 @@ trait TypesSupport:
4646 new GenericTypeConstructor (tpeTree.symbol.dri, data.asJava, null )
4747
4848 given TypeSyntax as AnyRef :
49- extension (tpe : Type ):
49+ extension (tpe : TypeRepr ):
5050 def dokkaType (using ctx : reflect.Context ): Bound =
5151 val data = inner(tpe)
5252 val dri = data.collect{
@@ -74,7 +74,7 @@ trait TypesSupport:
7474 tpeAnnotation.tpe.typeSymbol.toString == " class Repeated"
7575
7676 // TODO #23 add support for all types signatures that makes sense
77- private def inner (tp : reflect.Type )(using cxt : reflect.Context ): List [JProjection ] =
77+ private def inner (tp : reflect.TypeRepr )(using cxt : reflect.Context ): List [JProjection ] =
7878 def noSupported (name : String ): List [JProjection ] =
7979 println(s " WARN: Unsupported type: $name: ${tp.show}" )
8080 List (text(s " Unsupported[ $name] " ))
@@ -102,7 +102,7 @@ trait TypesSupport:
102102
103103
104104 case r : Refinement => { // (parent, name, info)
105- def getRefinementInformation (t : Type ): List [Type ] = t match {
105+ def getRefinementInformation (t : TypeRepr ): List [TypeRepr ] = t match {
106106 case r : Refinement => getRefinementInformation(r.parent) :+ r
107107 case tr : TypeRef => List (tr)
108108 }
@@ -118,7 +118,7 @@ trait TypesSupport:
118118 .reduceLeftOption((acc : List [JProjection ], elem : List [JProjection ]) => acc ++ texts(" , " ) ++ elem).getOrElse(List ())
119119 ++ texts(" )" )
120120
121- def parseRefinedElem (name : String , info : Type , polyTyped : List [JProjection ] = Nil ): List [JProjection ] = ( info match {
121+ def parseRefinedElem (name : String , info : TypeRepr , polyTyped : List [JProjection ] = Nil ): List [JProjection ] = ( info match {
122122 case m : MethodType => {
123123 val paramList = getParamList(m)
124124 texts(s " def $name" ) ++ polyTyped ++ paramList ++ texts(" : " ) ++ inner(m.resType)
@@ -137,7 +137,7 @@ trait TypesSupport:
137137 case other => noSupported(s " Not supported type in refinement $info" )
138138 } ) ++ texts(" ; " )
139139
140- def parsePolyFunction (info : Type ): List [JProjection ] = info match {
140+ def parsePolyFunction (info : TypeRepr ): List [JProjection ] = info match {
141141 case t : PolyType =>
142142 val paramBounds = getParamBounds(t)
143143 val method = t.resType.asInstanceOf [MethodType ]
@@ -185,8 +185,8 @@ trait TypesSupport:
185185 case tp @ TypeRef (qual, typeName) =>
186186 qual match {
187187 case r : RecursiveThis => texts(s " this. $typeName" )
188- case _ : Type | _ : NoPrefix => link(tp.typeSymbol)
189- case other => noSupported(s " Type : $tp" )
188+ case _ : TypeRepr | _ : NoPrefix => link(tp.typeSymbol)
189+ case other => noSupported(s " TypeRepr : $tp" )
190190 }
191191 // convertTypeOrBoundsToReference(reflect)(qual) match {
192192 // case TypeReference(label, link, xs, _) => TypeReference(typeName, link + "/" + label, xs, true)
@@ -248,7 +248,7 @@ trait TypesSupport:
248248
249249 case RecursiveType (tp) => inner(tp)
250250
251- private def typeBound (t : Type , low : Boolean ) =
251+ private def typeBound (t : TypeRepr , low : Boolean ) =
252252 val ignore = if (low) t.typeSymbol == defn.NothingClass else t.typeSymbol == defn.AnyClass
253253 val prefix = text(if low then " >: " else " <: " )
254254 t match {
0 commit comments