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 {
6464 import dotty .tools .dotc
6565 given dotc .core.Contexts .Context = rootContext.asInstanceOf
6666 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 )
6868 // println(s"members of ${sym.show} : ${members.map(_.show).mkString(", ")}")
6969 members.asInstanceOf [Iterator [Symbol ]]
7070 }
7171
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+
7280 private def localLookup (using QuoteContext )(query : String , owner : qctx.reflect.Symbol ): Option [qctx.reflect.Symbol ] = {
7381 import qctx .reflect ._
7482
@@ -116,7 +124,7 @@ trait MemberLookup {
116124 else
117125 owner.tree match {
118126 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 })
120128 case _ =>
121129 findMatch(hackMembersOf(owner))
122130 }
You can’t perform that action at this time.
0 commit comments