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

Wrong "method [...] not applicable for the arguments" error in Greclipse, not in Groovy #1301

Closed
mauromol opened this issue Sep 29, 2021 · 2 comments

Comments

@mauromol
Copy link

Consider the attached project, which is a variation of the one attached to #1300.

Compiling with ./gradlew jar works fine.
However if in Greclipse you open class test2.TestGreclipseError2, you'll get the following error:

The method extractResult(T) in the type TestGreclipseError2 is not applicable for the arguments (Response)

This drove me crazy because I could not understand why this was failing. Then, after extracting a test case for #1300, I made a quick test and discovered that groovyc compiles this fine, so it must be some glitch in Greclipse compiler I believe.

TestGroovyGradle2.zip

@mauromol
Copy link
Author

The workaround described at #1300 (comment) seems to fix this error as well in the provided test case, however in my main project (from which I extracted the test case) it seems not to be enough... I'm trying to understand why...

@mauromol
Copy link
Author

Ok, I determined that the problem in my main project is bound to null annotation analysis (@NonNullByDefault is too aggressive in this specific case), after I fixed that I can confirm that the workaround at #1300 (comment) indeed fixes this as well.

So, I close this since the origin of the problem is the same as #1300.

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