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

Comments

Projects
None yet
1 participant
@lombokissues
Collaborator

lombokissues commented Jul 14, 2015

Migrated from Google Code (issue 436)

@lombokissues

This comment has been minimized.

Show comment
Hide comment
@lombokissues

lombokissues Jul 14, 2015

Collaborator

👤 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.

Collaborator

lombokissues commented Jul 14, 2015

👤 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

This comment has been minimized.

Show comment
Hide comment
@lombokissues

lombokissues Jul 14, 2015

Collaborator

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

🔗 lomboktest.zip

Collaborator

lombokissues commented Jul 14, 2015

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

🔗 lomboktest.zip

@lombokissues

This comment has been minimized.

Show comment
Hide comment
@lombokissues

lombokissues Jul 14, 2015

Collaborator

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

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

Collaborator

lombokissues commented Jul 14, 2015

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

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

@lombokissues

This comment has been minimized.

Show comment
Hide comment
@lombokissues

lombokissues Jul 14, 2015

Collaborator

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

Fixed in edge:

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

Collaborator

lombokissues commented Jul 14, 2015

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

Fixed in edge:

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

@lombokissues

This comment has been minimized.

Show comment
Hide comment
@lombokissues

lombokissues Jul 14, 2015

Collaborator

End of migration

Collaborator

lombokissues commented Jul 14, 2015

End of migration

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment