-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Conversation
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.
The proper way to do this kind of tests is to add them to https://github.com/lampepfl/dotty/blob/master/compiler/test/dotty/tools/backend/jvm/InlineBytecodeTests.scala
@smarter I tried that but it is impossible to write by hand the equivalent access to the default pareameter getter. |
Ah, I would write a regular bytecode test that checks that the method is not called then, or maybe a décompilation test |
8fc1f51
to
cd78f23
Compare
Moved test to DottyBytecodeTests
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.
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.
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? |
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.
LGTM for the original part, but pls check my changes.
Invokedynamic is only used for lambdas, I don't see what it's doing here |
3ba4a14
to
cd78f23
Compare
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. |
No description provided.