Keith R. Bennett | 2 May 2008 15:36

Re: [groovy-user] Call to super(arg) Fails


Jochen -

Thank you for the excellent clarification.  I am a relative newcomer to
Groovy and could not find this information in the "Groovy in Action" book or
via a Google web search.   For the sake of future newcomers to Groovy, is it
possible and practical to include something like this in the compiler error
message?  Or are there too many messages that would need to be edited?  Even
something like "[original error message] or parentheses omitted" would be
very helpful.

- Keith

Jochen Theodorou wrote:
> 
> Keith R. Bennett schrieb:
>> Thank you, Andres.  I gues that was my silly syntactical mistake. ;)
>> 
>> I've only looked at this issue for a short time, but I can't see any
>> pattern
>> as to when parentheses are needed and when they're not.  Does anyone know
>> what the pattern is?  And is it by design, or by accident?
> 
> super() and this() are no normal method call, you always need 
> parentheses for them. As for other method calls, you can normally remove 
> them if the argument expressions itself will not contain parentheses and 
> if you do not want to make a path expression with the method call in the 
> beginning. Also you should not use [].
> 
> bye blackdrag
> 
> -- 
> Jochen "blackdrag" Theodorou
> The Groovy Project Tech Lead (http://groovy.codehaus.org)
> http://blackdragsview.blogspot.com/
> http://www.g2one.com/
> 

--

-- 
View this message in context: http://www.nabble.com/Call-to-super%28arg%29-Fails-tp16992759p17019603.html
Sent from the groovy - user mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Gmane