Skip to content

Fix #3653: generic Java signature of FunctionXXL #4287

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
Apr 10, 2018

Conversation

Duhemm
Copy link
Contributor

@Duhemm Duhemm commented Apr 10, 2018

We were encoding the generic Java signature of FunctionNs' with more
than P parameters as FunctionP<..params..> (which doesn't exist), but
in the bytecode, FunctionXXL is used instead.

This commit fixes that, so that the generic signature matches
FunctionXXL.

Fixes #3653

We were encoding the generic Java signature of `FunctionN`s' with more
than P parameters as `FunctionP<..params..>` (which doesn't exist), but
in the bytecode, FunctionXXL is used instead.

This commit fixes that, so that the generic signature matches
`FunctionXXL`.
@@ -127,6 +127,9 @@ object GenericSignatures {
case ref @ TypeParamRef(_: PolyType, _) =>
typeParamSig(ref.paramName.lastPart)

case RefOrAppliedType(sym, _, _) if defn.isXXLFunctionClass(sym) =>
Copy link
Contributor

@allanrenucci allanrenucci Apr 10, 2018

Choose a reason for hiding this comment

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

Shouldn't you add it as a new case in the already existing if else chain starting line 186

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Indeed

@allanrenucci allanrenucci merged commit 3cba055 into scala:master Apr 10, 2018
@allanrenucci allanrenucci deleted the fix/3653 branch April 10, 2018 14:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Java method parameter generic signature error for FunctionXXL
3 participants