@@ -6,15 +6,15 @@ trait MemberLookup {
6
6
7
7
def lookup (using Quotes )(
8
8
query : Query ,
9
- owner : qctx .reflect.Symbol ,
10
- ): Option [(qctx .reflect.Symbol , String )] = lookupOpt(query, Some (owner))
9
+ owner : quotes .reflect.Symbol ,
10
+ ): Option [(quotes .reflect.Symbol , String )] = lookupOpt(query, Some (owner))
11
11
12
12
def lookupOpt (using Quotes )(
13
13
query : Query ,
14
- ownerOpt : Option [qctx .reflect.Symbol ],
15
- ): Option [(qctx .reflect.Symbol , String )] =
14
+ ownerOpt : Option [quotes .reflect.Symbol ],
15
+ ): Option [(quotes .reflect.Symbol , String )] =
16
16
try
17
- import qctx .reflect ._
17
+ import quotes .reflect ._
18
18
19
19
def nearestClass (sym : Symbol ): Symbol =
20
20
if sym.isClassDef then sym else nearestClass(sym.owner)
@@ -59,25 +59,25 @@ trait MemberLookup {
59
59
println(s " [WARN] Unable to find a link for ${query} ${ownerOpt.fold(" " )(o => " in " + o.name)}" )
60
60
None
61
61
62
- private def hackMembersOf (using Quotes )(rsym : qctx .reflect.Symbol ) = {
63
- import qctx .reflect ._
62
+ private def hackMembersOf (using Quotes )(rsym : quotes .reflect.Symbol ) = {
63
+ import quotes .reflect ._
64
64
import dotty .tools .dotc
65
- given dotc .core.Contexts .Context = qctx .asInstanceOf [scala.quoted.runtime.impl.QuotesImpl ].ctx
65
+ given dotc .core.Contexts .Context = quotes .asInstanceOf [scala.quoted.runtime.impl.QuotesImpl ].ctx
66
66
val sym = rsym.asInstanceOf [dotc.core.Symbols .Symbol ]
67
67
val members = sym.info.decls.iterator.filter(_.isCompleted)
68
68
// println(s"members of ${sym.show} : ${members.map(_.show).mkString(", ")}")
69
69
members.asInstanceOf [Iterator [Symbol ]]
70
70
}
71
71
72
- private def hackIsNotAbsent (using Quotes )(rsym : qctx .reflect.Symbol ) = {
72
+ private def hackIsNotAbsent (using Quotes )(rsym : quotes .reflect.Symbol ) = {
73
73
import dotty .tools .dotc
74
- given dotc .core.Contexts .Context = qctx .asInstanceOf [scala.quoted.runtime.impl.QuotesImpl ].ctx
74
+ given dotc .core.Contexts .Context = quotes .asInstanceOf [scala.quoted.runtime.impl.QuotesImpl ].ctx
75
75
val sym = rsym.asInstanceOf [dotc.core.Symbols .Symbol ]
76
76
sym.isCompleted
77
77
}
78
78
79
- private def localLookup (using Quotes )(query : String , owner : qctx .reflect.Symbol ): Option [qctx .reflect.Symbol ] = {
80
- import qctx .reflect ._
79
+ private def localLookup (using Quotes )(query : String , owner : quotes .reflect.Symbol ): Option [quotes .reflect.Symbol ] = {
80
+ import quotes .reflect ._
81
81
82
82
inline def whenExists (s : Symbol )(otherwise : => Option [Symbol ]): Option [Symbol ] =
83
83
if s.exists then Some (s) else otherwise
@@ -129,7 +129,7 @@ trait MemberLookup {
129
129
}
130
130
}
131
131
132
- private def downwardLookup (using Quotes )(query : List [String ], owner : qctx .reflect.Symbol ): Option [qctx .reflect.Symbol ] =
132
+ private def downwardLookup (using Quotes )(query : List [String ], owner : quotes .reflect.Symbol ): Option [quotes .reflect.Symbol ] =
133
133
query match {
134
134
case Nil => None
135
135
case q :: Nil => localLookup(q, owner)
0 commit comments