Created
September 19, 2014 15:14
-
-
Save osscontributor/4504f68ceca7467f2daa to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
trait $ cat SomeTrait.groovy | |
trait SomeTrait { | |
int getMagicNumber() { | |
42 | |
} | |
} | |
trait $ cat SomeClass.groovy | |
class SomeClass implements SomeTrait { | |
static magicNumber = 'Forty Two' | |
} | |
trait $ 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 'int getMagicNumber()' must be implemented. | |
@ line 1, column 1. | |
class SomeClass implements SomeTrait { | |
^ | |
1 error |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment