-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Qute: Unexpected primitive equality #44610
Comments
/cc @mkouba (qute) |
Hm, I believe that this is a duplicate of #40097. It works if you change your template to:
or even:
|
Sure, but should this be necessary? {#if stats:count != 0} while this would work: {#if stats:count > 0} |
No, it should not, but it's already covered by #40097. In other words, if we fix #40097 then your template should work too because we should apply the "Widening Primitive Conversion" everywhere. That's why I said it's a duplicate.
Hm, you're right that I will try to propose something later today. |
Oh, then there must have been some misunderstanding here: #40097 (comment) |
Describe the bug
This Qute template is rendered as
0 is not 0
:The same happens when comparing a
long
returned from a method with anint
in a template.I didn't check for other types.
Expected behavior
Primitive numbers should be compared by their value, not their type.
Actual behavior
==
and!=
fail with primitive numbers of different data types.How to Reproduce?
No response
Output of
uname -a
orver
No response
Output of
java -version
No response
Quarkus version or git rev
3.15.2
Build tool (ie. output of
mvnw --version
orgradlew --version
)No response
Additional information
No response
The text was updated successfully, but these errors were encountered: