Skip to content

Instantly share code, notes, and snippets.

@TacoSteemers
Created November 17, 2013 17:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save TacoSteemers/7515911 to your computer and use it in GitHub Desktop.
Save TacoSteemers/7515911 to your computer and use it in GitHub Desktop.
'return' is not allowed in object initializer
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