You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Extra unapply completion should be added to the completion list, where it is allowed and completion with expected type parameters should be filtered as it is illegal at this position.
The test should pass.
Tips
My guess is that the root of the issue is in CaseDefCompletions, which is responsible for providing us with extra results. The logic probably matches against specific patterns, but what we should do instead is to recursively try to find whether one of the owners is case definition and all other owners in between are unapply methods.
The text was updated successfully, but these errors were encountered:
Fixes#19972.
Add pattern completion for `Unapply` tree contexts.
A typical example would be
```scala
optionList match
case List(S@@)
```
which should be prompted `Some(value)`, due to `List.unapplySeq`
expecting `Option[T]` patterns as arguments.
Compiler version
3.4.1
Minimized code
This test should be changed and pass.
Output
Expectation
Extra unapply completion should be added to the completion list, where it is allowed and completion with expected type parameters should be filtered as it is illegal at this position.
The test should pass.
Tips
My guess is that the root of the issue is in
CaseDefCompletions
, which is responsible for providing us with extra results. The logic probably matches against specific patterns, but what we should do instead is to recursively try to find whether one of the owners is case definition and all other owners in between are unapply methods.The text was updated successfully, but these errors were encountered: