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

VerifyError (in Eclipse) with ExtensionMethod #509

Closed
lombokissues opened this issue Jul 14, 2015 · 5 comments
Closed

VerifyError (in Eclipse) with ExtensionMethod #509

lombokissues opened this issue Jul 14, 2015 · 5 comments

Comments

@lombokissues
Copy link

Migrated from Google Code (issue 436)

@lombokissues
Copy link
Author

👤 majoorj@yahoo.com   🕗 Dec 12, 2012 at 18:15 UTC

What steps will reproduce the problem?

  1. Import the attached Eclipse project
  2. Run the Test.java class as a Java application

What is the expected output? What do you see instead?
Expected is a system print statement (false), but I get a VerifyError.

What version of the product are you using? On what operating system?
Lombok version 11.6
Eclipse Juno (but also fails on Indigo)
Java 7 on Windows

Please provide any additional information below.
I attached a complete Java Eclipse project, but otherwise the following standalone test case will reproduce it as well (in Eclipse that is).
Exception in thread "main" java.lang.VerifyError: Bad type on operand stack in method Test.main([Ljava/lang/String;)V at offset 18

Example:

import lombok.experimental.ExtensionMethod;
import java.util.AbstractMap.SimpleEntry;

@ ExtensionMethod({Test.TestExtensions.class})
public class Test {
public static void main(String... args) {
SimpleEntry<String, String> entry = new SimpleEntry<String, String>(null, "hello");
System.out.println(entry.getKey().Test1());
}

public static class TestExtensions {
public static boolean Test1(String $this) {
return $this != null;
}
}
}

If I use the extension method directly with a string it works fine, but it fails with if the string comes from a generic type.

Using Javac there is no such problem, it occurs in Eclipse.

@lombokissues
Copy link
Author

👤 majoorj@yahoo.com   🕗 Dec 12, 2012 at 18:15 UTC

🔗 lomboktest.zip

@lombokissues
Copy link
Author

👤 reinierz   🕗 Mar 11, 2013 at 22:51 UTC

Test case reproduced. We're working on this now.

@lombokissues lombokissues added the accepted The issue/enhancement is valid, sensible, and explained in sufficient detail label Jul 14, 2015
@lombokissues
Copy link
Author

👤 reinierz   🕗 Mar 11, 2013 at 23:28 UTC

Fixed in edge:

https://projectlombok.org/download-edge.html

@lombokissues lombokissues removed the accepted The issue/enhancement is valid, sensible, and explained in sufficient detail label Jul 14, 2015
@lombokissues
Copy link
Author

End of migration

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

No branches or pull requests

1 participant