[
https://issues.apache.org/jira/browse/GROOVY-11196?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Eric Milles updated GROOVY-11196:
---------------------------------
Fix Version/s: 4.0.16
> ambiguous method error for tap on null receiver
> -----------------------------------------------
>
> Key: GROOVY-11196
> URL: https://issues.apache.org/jira/browse/GROOVY-11196
> Project: Groovy
> Issue Type: Bug
> Affects Versions: 3.0.19, 5.0.0-alpha-2, 4.0.15
> Reporter: Eric Milles
> Assignee: Eric Milles
> Priority: Major
> Fix For: 5.0.0-alpha-3, 4.0.16
>
> Attachments: DgmConverter.java
>
>
> Consider the following:
> {code:groovy}
> abstract class A {
> abstract m(List list, String string)
> }
> class C extends A {
> @Override m(List list, String string) {
> print 'works'
> }
> }
> Object test(List list, String string) {
> list.tap {
> new C().m(it,string)
> }
> }
> test(null,"")
> {code}
> "list.tap{" propagates {{NullObject}} into closure and then method selection
> falls down.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)