[
https://issues.apache.org/jira/browse/GROOVY-5204?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Paul King closed GROOVY-5204.
-----------------------------
> @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
> Assignee: Eric Milles
> Priority: Major
> Fix For: 4.0.0-beta-1
>
>
> 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
(v8.20.1#820001)