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

Compiler error when compiling against JRE 8 #188

Closed
felixdo opened this issue Jul 24, 2016 · 2 comments
Closed

Compiler error when compiling against JRE 8 #188

felixdo opened this issue Jul 24, 2016 · 2 comments

Comments

@felixdo
Copy link
Contributor

felixdo commented Jul 24, 2016

When using Java 8 to compile groovy-eclipse I get:

[ERROR] Failed to execute goal org.eclipse.tycho:tycho-compiler-plugin:0.25.0:compile (default-compile) on project org.codehaus.groovy.eclipse.codeassist.completion: Compilation failure: Compilation failure:
[ERROR] C:\Users\felix\git\groovy-eclipse\ide\org.codehaus.groovy.eclipse.codeassist.completion\src\org\codehaus\groovy\eclipse\codeassist\processors\CharArraySequence.java:[35]
[ERROR] char[] chars() {
[ERROR] ^^^^^^
[ERROR] The return type is incompatible with CharSequence.chars()
[ERROR] 1 problem (1 error)
[ERROR] -> [Help 1]

CharSequence.chars() is a new method that was added in Java 8 and it collides with this implementation.

This also makes me wonder: The "official" build should use a JRE 8 to compile groovy from e46 on, since Eclipse Neon requires that so these errors are detected.

felixdo added a commit to felixdo/groovy-eclipse that referenced this issue Jul 24, 2016
@aclement
Copy link
Contributor

I've changed the method but don't have time to fix the build change too, unfortunately.

@felixdo
Copy link
Contributor Author

felixdo commented Jul 28, 2016

I found another one. To fix, just add an import in one class. (I could have organized imports but then the patch wouldn't be as trivial as it looks now)

diff --git a/base/org.codehaus.groovy20/src/org/codehaus/groovy/vmplugin/v5/Java5.java b/base/org.codehaus.groovy20/src/org/codehaus/groovy/vmplugin/v5/Java5.java
index 91cc923..d3a4047 100644
--- a/base/org.codehaus.groovy20/src/org/codehaus/groovy/vmplugin/v5/Java5.java
+++ b/base/org.codehaus.groovy20/src/org/codehaus/groovy/vmplugin/v5/Java5.java
@@ -18,6 +18,7 @@ package org.codehaus.groovy.vmplugin.v5;

import org.codehaus.groovy.GroovyBugError;
import org.codehaus.groovy.ast.;
+import org.codehaus.groovy.ast.Parameter;^M
import org.codehaus.groovy.ast.expr.
;
import org.codehaus.groovy.ast.stmt.ReturnStatement;
import org.codehaus.groovy.vmplugin.VMPlugin;

felixdo added a commit to felixdo/groovy-eclipse that referenced this issue Jul 28, 2016
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

2 participants