Closed
Description
Compiler version
3.4.1
Minimized code
// file dotty/tools/pc/tests/completion/CompletionSuite.scala
@Test def `context-bound-in-extension` =
check(
"""
|object x {
| extension [T: Orde@@]
|}
|""".stripMargin,
"Ordering scala.math.Ordering"
)
Output
No completions are available in this scenario
Expectation
Ordering should be properly completed in this situation.
Tips
The root cause of this problem is in interactive.Completion.scala
which has a special way to handle the extension defs, as after desugaring, there is no trace of this definition in typed trees.
It is probably happening when decision whether to use typed or untyped path happens, or at adjustedPath
creation site.