-
Notifications
You must be signed in to change notification settings - Fork 193
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
Compilation error when trying to assign int to Serializable #1385
Comments
This is the source of the issue: d571b94 |
https://issues.apache.org/jira/browse/GROOVY-10744 Regression for literals. But also fields, methods and variables of primitive type give error. |
The TL;DR is you can use double-quotes to indicate a To support |
Hmmm... I understand why you did this change. Still, these kind of things are hurting Greclipse... Is the main source of the problem in some way related to #175? |
It is not too late to revert this before 4.7.0 is finalized on Sep 30th. However it has already been released into the 3.0.13 and 4.0.5 batch compilers. If annotation attribute constants are as before, you would be required to use a typecast to indicate a @interface A { char value }
@A( (char)'c' )
class C { ... } |
IMHO, one-character strings in annotation values are much more frequent than char annotation values... so I would prefer the compromise on char rather than on String. But I leave the decision to you. Indeed, it was not nice at all to see those |
Assignability of non- |
Consider this Java class:
and this Groovy class:
An error is shown in the editor:
Same problem if I do:
Fixed if I do:
-1 as Integer
.This is a regression for sure, but I don't know when it started to appear.
Using Greclipse 4.7.0.v202208210205-e2112.
The text was updated successfully, but these errors were encountered: