@@ -49,19 +49,6 @@ object SyntheticsSupport:
49
49
They are valdefs that describe case companion objects and cases from enum.
50
50
TASTY crashed when calling _.tree on them.
51
51
*/
52
- private def hackGetmembers (using Quotes )(rsym : reflect.Symbol ): List [reflect.Symbol ] = {
53
- import reflect ._
54
- import dotty .tools .dotc
55
- given ctx : dotc.core.Contexts .Context = quotes.asInstanceOf [scala.quoted.runtime.impl.QuotesImpl ].ctx
56
- val sym = rsym.asInstanceOf [dotc.core.Symbols .Symbol ]
57
- sym.namedType.allMembers.iterator.map(_.symbol)
58
- .collect {
59
- case sym if
60
- (! sym.is(dotc.core.Flags .ModuleVal ) || sym.is(dotc.core.Flags .Given )) &&
61
- ! sym.flags.isAllOf(dotc.core.Flags .Enum | dotc.core.Flags .Case | dotc.core.Flags .JavaStatic ) =>
62
- sym.asInstanceOf [Symbol ]
63
- }.toList
64
- }
65
52
66
53
def getSupertypes (using Quotes )(c : reflect.ClassDef ) =
67
54
c.symbol.typeRef.baseClasses.map(b => b -> c.symbol.typeRef.baseType(b)).tail
@@ -76,3 +63,17 @@ object SyntheticsSupport:
76
63
typeForClass(c).asInstanceOf [dotc.core.Types .Type ]
77
64
.memberInfo(symbol.asInstanceOf [dotc.core.Symbols .Symbol ])
78
65
.asInstanceOf [TypeRepr ]
66
+
67
+ private def hackGetmembers (using Quotes )(rsym : reflect.Symbol ): List [reflect.Symbol ] = {
68
+ import reflect ._
69
+ import dotty .tools .dotc
70
+ given ctx : dotc.core.Contexts .Context = quotes.asInstanceOf [scala.quoted.runtime.impl.QuotesImpl ].ctx
71
+ val sym = rsym.asInstanceOf [dotc.core.Symbols .Symbol ]
72
+ sym.namedType.allMembers.iterator.map(_.symbol)
73
+ .collect {
74
+ case sym if
75
+ (! sym.is(dotc.core.Flags .ModuleVal ) || sym.is(dotc.core.Flags .Given )) &&
76
+ ! sym.flags.isAllOf(dotc.core.Flags .Enum | dotc.core.Flags .Case | dotc.core.Flags .JavaStatic ) =>
77
+ sym.asInstanceOf [Symbol ]
78
+ }.toList
79
+ }
0 commit comments