Skip to content

Commit fc2bf60

Browse files
committed
Move hacky methods at the end of file
1 parent 632b0e4 commit fc2bf60

File tree

1 file changed

+14
-13
lines changed

1 file changed

+14
-13
lines changed

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

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -49,19 +49,6 @@ object SyntheticsSupport:
4949
They are valdefs that describe case companion objects and cases from enum.
5050
TASTY crashed when calling _.tree on them.
5151
*/
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-
}
6552

6653
def getSupertypes(using Quotes)(c: reflect.ClassDef) =
6754
c.symbol.typeRef.baseClasses.map(b => b -> c.symbol.typeRef.baseType(b)).tail
@@ -76,3 +63,17 @@ object SyntheticsSupport:
7663
typeForClass(c).asInstanceOf[dotc.core.Types.Type]
7764
.memberInfo(symbol.asInstanceOf[dotc.core.Symbols.Symbol])
7865
.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

Comments
 (0)