-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Fix #3916: Fix interpretation of boxed value classes #4025
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
Conversation
if (clazz.getCanonicalName != tree.symbol.owner.showFullName) value // Already unboxed | ||
else { | ||
val method = getMethod(clazz, name, Nil) | ||
interpreted(method.invoke(value)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A minor irrelevant issue: the name interpreted
takes me a little while to realise there's no interpretation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will change the name
env(qualifier.symbol) | ||
val value = env(qualifier.symbol) | ||
val clazz = value.getClass | ||
if (clazz.getCanonicalName != tree.symbol.owner.showFullName) value // Already unboxed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the value class is a nested inner class, I guess this check will fail.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will add a test case and check it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is an issue with inner classes but it is not in this code. I will fix it another PR.
No description provided.