Created
November 17, 2013 17:39
-
-
Save TacoSteemers/7515911 to your computer and use it in GitHub Desktop.
'return' is not allowed in object initializer
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
Getting "Groovyc: 'return' is not allowed in object initializer"? | |
You forgot a pair of parenthesis. | |
The following code | |
public List getImportedClasses | |
{ | |
return imports | |
} | |
is not valid in Groovy or Java. Add the pair of parenthesis: | |
public List getImportedClasses() | |
{ | |
return imports | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment