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

Deprecated class usage results in compilation error in IntelliJ IDEA #466

Closed
monteragi opened this issue Jul 28, 2023 · 4 comments
Closed

Comments

@monteragi
Copy link

Describe the bug
Compilatation fails if @deprecated class is used in the source code.
It fails using Intelliji Idea for build. Maven compiles with no error...
I reproduced it on two different PCs. Tried different JDKs - result is the same.

To Reproduce
Steps to reproduce the behavior:

  1. Install IntelliJ IDEA 2023.2 (Community Edition)
  2. Checkout and open project: https://github.com/monteragi/manifold-test
  3. Select "Build Project" or Run from the IntelliJ IDEA toolbar.

Expected behavior
Project is built / executed sucessfully.

Actual behavior
It fails with compilation error:

\src\main\java\mytest\MM.java:6:34
java: unexpected type
  required: class
  found:    variable

Screenshots
I recorded the short video. It shows the problem clearly. Please check
https://www.youtube.com/watch?v=CfGud1mHHBQ

Desktop (please complete the following information):

  • OS Type & Version: Windows 10 Pro
  • Java/JDK version: OpenJDK Temurin 17 and others.. Language Level 11
  • IDE version (IntelliJ IDEA or Android Studio): IntelliJ IDEA 2023.2 (Community Edition)
  • Manifold version: 2023.1.10
  • Manifold IntelliJ plugin version: 2023.1.10

Additional context
Project uses: manifold-ext-rt and manifold-ext
Compiliation via Maven works fines.

Stack trace
\src\main\java\mytest\MM.java:6:34
java: unexpected type
required: class
found: variable

@monteragi
Copy link
Author

It's something related to the deprecation warning... If I suppress it by "@SuppressWarnings("deprecation")" then compilation goes fine....

@rsmckinney
Copy link
Member

@monteragi Thanks for this info, good to know. I think I know the problem, should have a fix ready for a release eod tomorrow.

rsmckinney added a commit that referenced this issue Jul 31, 2023
- limit the bypassing of javac's shadowing, where an instance field shadows an inner class of the same name, so that only the case involving properties is covered, which is the intended purpose
@rsmckinney
Copy link
Member

Fixed available with release 2023.1.11

@monteragi
Copy link
Author

@rsmckinney Thanks a lot for the fix!

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

No branches or pull requests

2 participants