Skip to content
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

The same name class exist in the same package, but "type is already defined" error will auto disappear #2327

Closed
hhkrob1 opened this issue Feb 22, 2022 · 2 comments

Comments

@hhkrob1
Copy link

hhkrob1 commented Feb 22, 2022

[provide a description of the issue]

Environment
  • Operating System: Windows 11
  • JDK version: OpenJDK 17 and JDK1.8
  • Visual Studio Code version: 1.64.2
  • Java extension version: 1.3.0
Steps To Reproduce
  1. When the same name class exist in the same package, click run in codelen, compile will not pass, problem pannel will display "type is already defined" error, click this navigation to related code line, the error(Red wavy line) auto disappear and never show again. but it is a error, it will be always warnning.
  2. Related gif:
    javabug1

[Please attach a sample project reproducing the error]
Please attach logs

Current Result

When the same name class exist in the same package, it is a error, it will be always warnning, navigation to relative code line, the error auto disappear and never show again until reopen VScode next time.

Expected Result

When the same name class exist in the same package, it is a error, it will be always warnning.

Additional Informations
@cworld1
Copy link

cworld1 commented Jul 9, 2023

Same problem.

@rgrunber
Copy link
Member

I just noticed this is a duplicate of #1111. I explain what's happening at #1111 (comment) (and the previous comment). The way we collect diagnostics has a risk of hiding diagnostics at the file-level that can only be reported through a full compilation.

There may be a few ways to avoid this happening.

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

4 participants