groovy-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "" <>
Subject Optional parentheses for methods with all uppercase names
Date Sat, 27 Feb 2016 22:08:32 GMT
[First off I apologize for possibly reposting this question. My original
posting never went out to the maillist due to unknown reasons. This is my
second attempt. Sorry if you already read this before.]

I am a developing a Groovy DSL to create Dockerfiles

The format of a Dockerfile looks like:


Instructions are case-insensitive but convention is for them to be

However Groovy doesn't seem to support optional parentheses if the method
name is all uppercase:

def FOOBAR(String msg) {
println msg
FOOBAR "hello"

groovyc: unexpected token: hello @ line 2, column 8.
FOOBAR "hello"

Do you know of any way to get this to work or is this a known limitation of

I tried with Groovy version 2.4.5

If anyone has any insight, it would be very helpful.


Matthias GrĂ¼ter   //

View raw message