[ https://issues.apache.org/jira/browse/GROOVY-5204?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15312151#comment-15312151 ]
Paul King commented on GROOVY-5204: ----------------------------------- Perhaps this is nothing to do with @Delegate. I get the same error message from: {code} class A { def foo(a = ''){} def foo() {} } {code} > @Delegate to a method with optional params > ------------------------------------------ > > Key: GROOVY-5204 > URL: https://issues.apache.org/jira/browse/GROOVY-5204 > Project: Groovy > Issue Type: Bug > Components: xforms > Affects Versions: 2.4.0-rc-1 > Reporter: Maxim Medvedev > > Groovyc fails to compile this code with a message like 'method foo is already > defined in B' > {code} > class A { > def foo(a = ''){} > } > class B { > @Delegate A a = new A() > def foo(){} > } > {code} > while these snippets are compiled pretty well > {code} > class A { > def foo(a){} > def foo(){} > } > class B { > @Delegate A a = new A() > def foo(){} > } > {code} > {code} > class A { > def foo(a=''){} > } > class B extends A{ > def foo(){} > } > {code} > IMHO there should be a warning (or nothing at all) instead of the compilation > error. -- This message was sent by Atlassian JIRA (v6.3.4#6332)