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

compile error when i use @ExtensionMethod #2889

Closed
zhoujiaping opened this issue Jun 25, 2021 · 7 comments
Closed

compile error when i use @ExtensionMethod #2889

zhoujiaping opened this issue Jun 25, 2021 · 7 comments

Comments

@zhoujiaping
Copy link

zhoujiaping commented Jun 25, 2021

Describe the bug
when i use @ExtensionMethod, some times it will report compile error, java.lang.Stackoverflow.
To Reproduce

package org.example.ext;

import lombok.experimental.ExtensionMethod;
import org.assertj.core.util.Lists;
import org.junit.jupiter.api.Test;
import java.util.Arrays;

@ExtensionMethod(Arrays.class)
public class ExtensionsBugTest {

    @Test
    public void testCompileError() {
       Lists.newArrayList("ONE","TWO").forEach(it->
               println(it)
       );
       Lists.newArrayList("ONE","TWO").forEach(it->
               println(it)
       );
    }
    public <T> void println(T t){
        System.out.println(t);
    }

}

Expected behavior
it works.

Version info (please complete the following information):

  • Lombok 1.18.4
  • Platform (jdk 1.8.0_291)

Additional context

@dstango
Copy link

dstango commented Jun 25, 2021

possible duplicate: #2741

@Rawi01
Copy link
Collaborator

Rawi01 commented Jun 25, 2021

@zhoujiaping Can you update your lombok version and try if the error is still there?

@zhoujiaping
Copy link
Author

@Rawi01 i had try 1.18.20,1.18.18,1.18.16,1.18.14,1.18,12,1.18.10,1.18.8,1.18.6,1.18.4,1.18.2,1.18.0
but got the same error.

@zhoujiaping
Copy link
Author

@dstango thanks. is this fixed?

@dstango
Copy link

dstango commented Jun 26, 2021

@zhoujiaping I tried it and can't reproduce it.
My test environment:

  • maven-project
  • eclipse 2021-06
  • jdk8

Do you get the error when doing a maven build or in your IDE? Or do you have a totall different setup?

@Rawi01
Copy link
Collaborator

Rawi01 commented Jul 3, 2021

@zhoujiaping I vaguely remember fixing a problem like that. Can you share a full stacktrace?

@zhoujiaping
Copy link
Author

@Rawi01 for 1.18.4, the problem still exists. but i tried 1.18.24, it works well. thanks!

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

3 participants