File tree Expand file tree Collapse file tree 1 file changed +2
-12
lines changed
scaladoc/src/dotty/tools/scaladoc/tasty Expand file tree Collapse file tree 1 file changed +2
-12
lines changed Original file line number Diff line number Diff line change @@ -63,18 +63,8 @@ object SyntheticsSupport:
63
63
}.toList
64
64
}
65
65
66
- private def hackGetSupertypes (using Quotes )(rdef : reflect.ClassDef ) = {
67
- import reflect ._
68
- import dotty .tools .dotc
69
- given dotc .core.Contexts .Context = quotes.asInstanceOf [scala.quoted.runtime.impl.QuotesImpl ].ctx
70
- val classdef = rdef.asInstanceOf [dotc.ast.tpd.TypeDef ]
71
- val ref = classdef.symbol.info.asInstanceOf [dotc.core.Types .ClassInfo ].appliedRef
72
- val baseTypes : List [(dotc.core.Symbols .Symbol , dotc.core.Types .Type )] =
73
- ref.baseClasses.map(b => b -> ref.baseType(b))
74
- baseTypes.asInstanceOf [List [(Symbol , TypeRepr )]]
75
- }
76
-
77
- def getSupertypes (using Quotes )(c : reflect.ClassDef ) = hackGetSupertypes(c).tail
66
+ def getSupertypes (using Quotes )(c : reflect.ClassDef ) =
67
+ c.symbol.typeRef.baseClasses.map(b => b -> c.symbol.typeRef.baseType(b)).tail
78
68
79
69
def typeForClass (using Quotes )(c : reflect.ClassDef ): reflect.TypeRepr =
80
70
import reflect ._
You can’t perform that action at this time.
0 commit comments