-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Completions causing AssertionError with missing implicit parameter #13467
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Happened in scalameta/metals#3100 |
Is this a regression? If so it'd be good to know the first nightly where this happened. |
Also we would need a way to reproduce this in the dotty repo, like a unit test. |
Weirdly enough this seems to work with test: @Test def untilMethod: Unit = {
code"""|object A {
| Array.concat${m1}
|}""".withSource
.completion(m1, Set(("until", Method, "until(end: Int): Range")))
} I will see if maybe it was fixed in the nightlies |
I tried to reproduce this and the problem doesn't occur in REPL. Also in my IDE this broke only after I upgraded Metals |
So the issue was caused by #13173 Any way we can avoid setting the val freshContext = ctx.fresh
.setCompilationUnit(unit)
.setPeriod(
Period(
driver.currentCtx.runId,
driver.currentCtx.base.typerPhase.id
)
) ? It seems that we should already be in the typerPhase, but the context doesn't seem to contain that information. I don't think it's quite intuitive that we need to force it here. |
Compiler version
3.1.0-RC1
Minimized code
when cursor at
@@
Output
Expectation
Completion of:
Similar thing happens with:
The text was updated successfully, but these errors were encountered: