Description
This code causes a compilation error:
class A { private String foo() { "1" } def bar() { foo() } } def a = new A() assert a.bar() == "1" class B extends A { Integer foo() {2} } def b = new B() assert b.bar()=="1"
Instead the code should successfully compile and run. The correct value for the return value is interesting. It should return "1" with Java-style semantics.
If duck-typing was more aggressive it could return 2 but that wouldn't be honoring the inner foo() being private.