Skip to content
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

Handle invokespecial edge case #343

Open
jvilk opened this issue Nov 20, 2014 · 1 comment
Open

Handle invokespecial edge case #343

jvilk opened this issue Nov 20, 2014 · 1 comment
Labels

Comments

@jvilk
Copy link
Member

jvilk commented Nov 20, 2014

We need to write a test that covers the following crazy scenario:
http://stackoverflow.com/a/8950564

Essentially, we need to write a test that has the following inheritance hierarchy:

C (child of C) -> B (child of A) -> A (parent)

A should implement a method foo, and C should override it. C's implementation should call super.foo().

We compile C against a version of B that does not have foo defined. At runtime, we force C to execute with a version of B that does have foo defined.

As currently defined, doppio will incorrectly execute A.foo(), because it will not perform the needed lookup.

We can accomplish this by having the foo version of B in a subfolder of our test folder, and put it on the classpath only at runtime.

@jvilk jvilk added the bug label Nov 20, 2014
@jvilk
Copy link
Member Author

jvilk commented Nov 23, 2014

We will also need to see if there is a way to force javac to emit an invokespecial call that uses the old semantics, e.g. in which case super.foo() should invoke A.foo(). Perhaps this can be achieved through specifying a different target version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant