|
|
|
Arno, I do not have the ability to close this issue. I think my login to Jira does not have the power. You can consider this closed.
I see. This is not compatible with my understanding of the JIRA standard workflow.
However, I have bad news for you: I removed your fix. The reason being is that in Java there is no such thing as a "byte literal" or "short literal". "new Literal(new Byte(8))" worked only accidentially!
But Java's conversion rules (JLS2 5.2) imply that you can legally assign an integer literal to, say, a byte variable, if the constant value of the integer literal is in range: byte a = 3; I added an argument type check to "Literal(Object)" which throws IllegalArgumentExceptions. I would strongly urge you to reconsider this choice. While Java does not allow byte literals directly, making your AST support them increases the expressive power of your library, without exposing any bugs.
In fact, this ability greatly simplifies targeting Janino's AST from a different compiler, which is exactly what we are doing. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||
Please test.