-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Double vision of toplevel definition in VSCode #6208
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
Potentially related to #6201. |
FWIW I hit the same issue on my first try of Dotty in VSCode:
IO in
I noticed #6201 is marked as Fixed by a commit that only includes test code. Was it actually fixed by an earlier change, and the test is to prevent regression? |
This could be a case where |
I made a very simple program that gives these errors trait Test
implied for Test Which gives
and
Interestingly I didn't get any errors when I just defined a top level value like |
Toplevel defs are enclosed in an object named `<source>$package` by `Desugar#packageDef`, this didn't work correctly in the IDE because the name of the VirtualFile was the whole URI of the file. In particular this lead to double-vision problems ("cannot merge ...") when the toplevel definition was also present on the classpath.
Opening VSCode on BryanAbate@da2e2fa and navigating to
tastydoc/src/dotty/tastydoc/printer.scala
will show a bunch of errors like the one below:However, the code compiles w/o issues in SBT.
IDE LSP communication logs show nothing out of the ordinary, neither does anything appear in SBT.
The text was updated successfully, but these errors were encountered: