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

CompletionResultRequestor compares different ICompilationUnit types #1582

Closed
fbricon opened this issue Oct 23, 2020 · 1 comment · Fixed by #1583
Closed

CompletionResultRequestor compares different ICompilationUnit types #1582

fbricon opened this issue Oct 23, 2020 · 1 comment · Fixed by #1583
Assignees

Comments

@fbricon
Copy link
Contributor

fbricon commented Oct 23, 2020

org.eclipse.jdt.internal.compiler.env.ICompilationUnit is compared to org.eclipse.jdt.core.ICompilationUnit in https://github.com/eclipse/eclipse.jdt.ls/blob/f22156c1d99209943f26d67c10f7193753b0eb3b/org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/syntaxserver/CompletionResultRequestor.java#L72

which results in a warning:
Unlikely argument type for equals(): ICompilationUnit seems to be unrelated to ICompilationUnit

@testforstephen
Copy link
Contributor

The implementation class CompilationUnit implements both interfaces, and it works at the runtime. I will erase the type info for unitToSkip to Object.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants