Skip to content

Code completion does not work in REPL for opaque types #6415

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

Closed
anatoliykmetyuk opened this issue May 1, 2019 · 0 comments
Closed

Code completion does not work in REPL for opaque types #6415

anatoliykmetyuk opened this issue May 1, 2019 · 0 comments
Assignees

Comments

@anatoliykmetyuk
Copy link
Contributor

This is becuase opaque type T = Int is desugared to type T = T.T, and autocompletion targets T.T instead of Int. The reason is that the code meant for autocompletion is inferred based on the position of the cursor in the user input. This position is oblivious to the desugaring and other transformation done to the tree as part of the typecheck for code completion. See #6414 for some discussion.

@anatoliykmetyuk anatoliykmetyuk self-assigned this May 2, 2019
anatoliykmetyuk added a commit to dotty-staging/dotty that referenced this issue May 2, 2019
The completion did not work because the desugared version of the
opaque type's definition shared the span with its private definition
inside the companion object.
anatoliykmetyuk added a commit to dotty-staging/dotty that referenced this issue May 2, 2019
The completion did not work because the desugared version of the
opaque type's definition shared the span with its private definition
inside the companion object.
anatoliykmetyuk added a commit that referenced this issue May 3, 2019
 Fix #6415: Enable REPL code completion for opaque types
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant