Skip to content

Kotlin: fix bit-inversion operator for Byte and Short types #10797

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

Merged
merged 2 commits into from
Oct 17, 2022

Conversation

smowton
Copy link
Contributor

@smowton smowton commented Oct 12, 2022

No description provided.

@smowton smowton requested review from a team as code owners October 12, 2022 16:23
@@ -2442,7 +2442,10 @@ open class KotlinFileExtractor(
}
}
tw.writeExprsKotlinType(id, type.kotlinResult.id)
unaryopDisp(id)
if (target.name.asString() == "inv" && (c.type.isByte() || c.type.isShort()))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does isFunction work on extensions? Would isFunction(target, "kotlin.experimental", "Byte", "inv") match on this target? This way we would also check the package and not just the function name.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, done (though it checks for the package of Byte / Short, not the package where the ext method is declared)

@smowton smowton merged commit eb97735 into github:main Oct 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants