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 @@ -64,11 +64,19 @@ trait MemberLookup {
64
64
import dotty .tools .dotc
65
65
given dotc .core.Contexts .Context = rootContext.asInstanceOf
66
66
val sym = rsym.asInstanceOf [dotc.core.Symbols .Symbol ]
67
- val members = sym.info.decls.iterator.filterNot (_.isAbsent( false ) )
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 QuoteContext )(rsym : qctx.reflect.Symbol ) = {
73
+ import qctx .reflect ._
74
+ import dotty .tools .dotc
75
+ given dotc .core.Contexts .Context = rootContext.asInstanceOf
76
+ val sym = rsym.asInstanceOf [dotc.core.Symbols .Symbol ]
77
+ sym.isCompleted
78
+ }
79
+
72
80
private def localLookup (using QuoteContext )(query : String , owner : qctx.reflect.Symbol ): Option [qctx.reflect.Symbol ] = {
73
81
import qctx .reflect ._
74
82
@@ -116,7 +124,7 @@ trait MemberLookup {
116
124
else
117
125
owner.tree match {
118
126
case tree : ClassDef =>
119
- findMatch(tree.body.iterator.collect { case t : Definition => t.symbol })
127
+ findMatch(tree.body.iterator.collect { case t : Definition if hackIsNotAbsent(t.symbol) => t.symbol })
120
128
case _ =>
121
129
findMatch(hackMembersOf(owner))
122
130
}
You can’t perform that action at this time.
0 commit comments