File tree Expand file tree Collapse file tree 2 files changed +16
-2
lines changed
compiler/src/dotty/tools/dotc/interactive
presentation-compiler/test/dotty/tools/pc/tests/completion Expand file tree Collapse file tree 2 files changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -587,8 +587,9 @@ object Completion:
587587
588588 // 1. The extension method is visible under a simple name, by being defined or inherited or imported in a scope enclosing the reference.
589589 val extMethodsInScope = scopeCompletions.names.toList.flatMap:
590- case (name, denots) => denots.collect:
591- case d : SymDenotation if d.isTerm && d.termRef.symbol.is(Extension ) => (d.termRef, name.asTermName)
590+ case (name, denots) =>
591+ denots.collect:
592+ case d if d.isTerm && d.symbol.is(Extension ) => (d.symbol.termRef, name.asTermName)
592593
593594 // 2. The extension method is a member of some given instance that is visible at the point of the reference.
594595 val givensInScope = ctx.implicits.eligible(defn.AnyType ).map(_.implicitRef.underlyingRef)
Original file line number Diff line number Diff line change @@ -2228,3 +2228,16 @@ class CompletionSuite extends BaseCompletionSuite:
22282228 |""" .stripMargin,
22292229 " test: Int"
22302230 )
2231+
2232+ @ Test def `macros` =
2233+ check(
2234+ """
2235+ |object Macro:
2236+ | import scala.quoted.*
2237+ | def dbgImpl[A](a: Expr[A])(using Quotes): Expr[A] =
2238+ | import quotes.reflect.*
2239+ | a.asTer@@
2240+ |
2241+ |""" .stripMargin,
2242+ " asTerm: Term"
2243+ )
You can’t perform that action at this time.
0 commit comments