Eric Milles created GROOVY-11196: ------------------------------------ Summary: 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: 4.0.15, 5.0.0-alpha-2, 3.0.19 Reporter: Eric Milles Assignee: Eric Milles
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)