Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.1-rc-2
-
Fix Version/s: 1.1-rc-3
-
Component/s: class generator
-
Labels:None
-
Environment:JDK6u3, WinXP
-
Number of attachments :
Description
from mailing list:
Hi all,
Executing the following code, Groovy will complain:
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed, Script2: 3: Can't have an abstract method in a non-abstract class. The class 'CallableTask' must be declared abstract or the method 'java.lang.Object call()' must be implemented.
@ line 3, column 1.
1 error
<groovy>
import java.util.concurrent.*
class CallableTask implements Callable<String> {
public String call() {
return new Date().toString()
}
}
</groovy>
but in Java, the code can be compiled with no problem.
Could you some one tell me why?
Thanks in advance,
Daniel.Sun
looks like the code just ignored interfaces. I corrected that.