Skip to content

Fix #4172: Add regression test #4914

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 1 commit into from
Aug 11, 2018
Merged

Conversation

nicolasstucki
Copy link
Contributor

No description provided.

smarter
smarter previously requested changes Aug 9, 2018
Copy link
Member

@smarter smarter left a comment

Choose a reason for hiding this comment

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

@nicolasstucki
Copy link
Contributor Author

@smarter I tried that but it is impossible to write by hand the equivalent access to the default pareameter getter.

@smarter
Copy link
Member

smarter commented Aug 9, 2018

Ah, I would write a regular bytecode test that checks that the method is not called then, or maybe a décompilation test

Copy link
Contributor

@Blaisorblade Blaisorblade left a comment

Choose a reason for hiding this comment

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

Looks somewhat reasonable: all other tests use Invoke as well.

But don't we emit InvokeDynamic sometimes? Checks for the absence of calls (like this one, dontWrapArraysInJavaVarargs and noBoxingInSyntheticEquals) won't notice that. That seems fragile.

@nicolasstucki
Copy link
Contributor Author

In this case it is a call to a final method in the same class, it will not be an invokeDynamic.

@Blaisorblade
Copy link
Contributor

In this case it is a call to a final method in the same class, it will not be an invokeDynamic.

And with the commits I pushed, our tests will enforce (part of) that too 😉. Can you please review them?

Copy link
Contributor

@Blaisorblade Blaisorblade left a comment

Choose a reason for hiding this comment

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

LGTM for the original part, but pls check my changes.

@smarter
Copy link
Member

smarter commented Aug 11, 2018

Invokedynamic is only used for lambdas, I don't see what it's doing here

@Blaisorblade
Copy link
Contributor

Invokedynamic is only used for lambdas, I don't see what it's doing here

Is that tested? It seems easier to test for InvokeDynamic than to argue that can't possibly affect the test results, that's what we test for. Anyway, I dropped my commits since you agree.

@nicolasstucki nicolasstucki merged commit 736ad61 into scala:master Aug 11, 2018
@nicolasstucki nicolasstucki deleted the fix-#4172 branch August 11, 2018 14:28
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.

3 participants