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 @@ -615,8 +615,9 @@ object Completion:
615
615
616
616
// 1. The extension method is visible under a simple name, by being defined or inherited or imported in a scope enclosing the reference.
617
617
val extMethodsInScope = scopeCompletions.names.toList.flatMap:
618
- case (name, denots) => denots.collect:
619
- case d : SymDenotation if d.isTerm && d.termRef.symbol.is(Extension ) => (d.termRef, name.asTermName)
618
+ case (name, denots) =>
619
+ denots.collect:
620
+ case d if d.isTerm && d.symbol.is(Extension ) => (d.symbol.termRef, name.asTermName)
620
621
621
622
// 2. The extension method is a member of some given instance that is visible at the point of the reference.
622
623
val givensInScope = ctx.implicits.eligible(defn.AnyType ).map(_.implicitRef.underlyingRef)
Original file line number Diff line number Diff line change @@ -2275,3 +2275,16 @@ class CompletionSuite extends BaseCompletionSuite:
2275
2275
|""" .stripMargin,
2276
2276
" test: Int"
2277
2277
)
2278
+
2279
+ @ Test def `macros` =
2280
+ check(
2281
+ """
2282
+ |object Macro:
2283
+ | import scala.quoted.*
2284
+ | def dbgImpl[A](a: Expr[A])(using Quotes): Expr[A] =
2285
+ | import quotes.reflect.*
2286
+ | a.asTer@@
2287
+ |
2288
+ |""" .stripMargin,
2289
+ " asTerm: Term"
2290
+ )
You can’t perform that action at this time.
0 commit comments