You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
.../LombokValTest.java:43: error: Cannot use 'val' here because initializer expression does not have a representable type: Type cannot be resolved
val decrypted = decipher.doFinal(encrypted);
Expected behavior
I expect @val to correctly deduce the type of cipher.
Replacing @val with final Cipher produces a successful compilation.
It seems that the assumeNoThrow trick is too clever and type information gets lost.
Version info (please complete the following information):
Lombok version = 1.18.18
OpenJDK javac version = 1.8.0_265
Additional context
Our production builds is driven by Gradle 6.8.3.
The Eclipse plugin (same Lombok version) does not mark errors at the commented line and completes compilation successfully.
The text was updated successfully, but these errors were encountered:
Rawi01
added a commit
to Rawi01/lombok
that referenced
this issue
Mar 25, 2021
Can confirm that this does not work but the problem is that you use val on the left hand and on the right hand side of the assignment inside the supplier. If you replace val x with Cipher x it compiles too. I just created a PR to fix this.
Describe the bug
To Reproduce
Expected behavior
I expect
@val
to correctly deduce the type ofcipher
.Replacing
@val
withfinal Cipher
produces a successful compilation.It seems that the
assumeNoThrow
trick is too clever and type information gets lost.Version info (please complete the following information):
Additional context
Our production builds is driven by Gradle 6.8.3.
The Eclipse plugin (same Lombok version) does not mark errors at the commented line and completes compilation successfully.
The text was updated successfully, but these errors were encountered: