-
Notifications
You must be signed in to change notification settings - Fork 411
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
Cannot make a static reference to the non-static type T #1781
Comments
This is an Eclipse regression issue. It can be reproduced in Eclipse 4.20M3 and Eclipse I20210526-2310. |
Thanks for narrowing this down. Also seems to have been reported recently upstream as https://bugs.eclipse.org/bugs/show_bug.cgi?id=572873 . |
I'm using Eclipse 2020-12. Yes, it's same as the upstream issue. If the generic method includes a lambda expression and use the generics inside the lambda expression, it will report this error. |
This is a regression issue introduced by 2021-03 release. And the upstream issue has been fixed and targeted for 4.20 RC2. And the I-build for 4.20 RC2 is released at June 3, see https://download.eclipse.org/eclipse/downloads/. But the release download page (https://download.eclipse.org/releases/2021-06/) didn't include RC2 yet. The release link is what we used in target platform definition. @rgrunber Do you know what's the status of 4.20 RC2? |
Yup, and we'll likely be able to adopt the final release final release of 2021-06 (4.20) next Wednesday : https://wiki.eclipse.org/Category:SimRel-2021-06 . We can at least use the I-build to verify. |
Opening the sample code in VS Code, it reports
"Cannot make a static reference to the non-static type T"
error at the line ofpublic void accept(T t)
. The same code doesn't have error in Eclipse and Intellij IDEA.The text was updated successfully, but these errors were encountered: