File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -59,11 +59,19 @@ trait MemberLookup {
59
59
import dotty .tools .dotc
60
60
given dotc .core.Contexts .Context = rootContext.asInstanceOf
61
61
val sym = rsym.asInstanceOf [dotc.core.Symbols .Symbol ]
62
- val members = sym.info.decls.iterator.filterNot (_.isAbsent( false ) )
62
+ val members = sym.info.decls.iterator.filter (_.isCompleted )
63
63
// println(s"members of ${sym.show} : ${members.map(_.show).mkString(", ")}")
64
64
members.asInstanceOf [Iterator [Symbol ]]
65
65
}
66
66
67
+ private def hackIsNotAbsent (using QuoteContext )(rsym : qctx.reflect.Symbol ) = {
68
+ import qctx .reflect ._
69
+ import dotty .tools .dotc
70
+ given dotc .core.Contexts .Context = rootContext.asInstanceOf
71
+ val sym = rsym.asInstanceOf [dotc.core.Symbols .Symbol ]
72
+ sym.isCompleted
73
+ }
74
+
67
75
private def localLookup (using QuoteContext )(query : String , owner : qctx.reflect.Symbol ): Option [qctx.reflect.Symbol ] = {
68
76
import qctx .reflect ._
69
77
@@ -111,7 +119,7 @@ trait MemberLookup {
111
119
else
112
120
owner.tree match {
113
121
case tree : ClassDef =>
114
- findMatch(tree.body.iterator.collect { case t : Definition => t.symbol })
122
+ findMatch(tree.body.iterator.collect { case t : Definition if hackIsNotAbsent(t.symbol) => t.symbol })
115
123
case _ =>
116
124
findMatch(hackMembersOf(owner))
117
125
}
You can’t perform that action at this time.
0 commit comments