Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.7.4, 1.7.5, 1.8-beta-3
-
None
Description
The following code compiles with 1.7.3 but fails with 1.7.4, 1.7.5 and 1.8.0-beta-3.
SomeInterface.groovy
interface SomeInterface {
void doSomething()
}
SomeOtherInterface.groovy
interface SomeOtherInterface extends SomeInterface {}
SomeClass.groovy
class SomeClass {
@Delegate
SomeOtherInterface someOtherInterface
}
Compiling with 1.7.3:
$ groovy -version Groovy Version: 1.7.3 JVM: 1.6.0_22 $ groovyc SomeClass.groovy $
Compiling with 1.7.4:
$ groovy -version Groovy Version: 1.7.4 JVM: 1.6.0_22 $ groovyc SomeClass.groovy org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: SomeClass.groovy: 1: Can't have an abstract method in a non-abstract class. The class 'SomeClass' must be declared abstract or the method 'void doSomething()' must be implemented. @ line 1, column 1. class SomeClass { ^ 1 error $
Compiling with 1.7.5:
$ groovy -version Groovy Version: 1.7.5 JVM: 1.6.0_22 $ groovyc SomeClass.groovy org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: SomeClass.groovy: 1: Can't have an abstract method in a non-abstract class. The class 'SomeClass' must be declared abstract or the method 'void doSomething()' must be implemented. @ line 1, column 1. class SomeClass { ^ 1 error $
Compiling with 1.8.0-beta-3:
$ groovy -version Groovy Version: 1.8.0-beta-3 JVM: 1.6.0_22 $ groovyc SomeClass.groovy org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: SomeClass.groovy: 1: Can't have an abstract method in a non-abstract class. The class 'SomeClass' must be declared abstract or the method 'void doSomething()' must be implemented. @ line 1, column 1. class SomeClass { ^ 1 error $
This may be related to GROOVY-4163.