Open
Description
Consider the following:
class C {
def m() { x = null }
private void setX(x) {}
}
class D extends C /*implements Map*/ {
/*
@Delegate Map m
void setX(x) { }
void set(String name, value) { }
*/
}
new D().m()
The expression "x = null" will not make use of the private setter of C
if one of the items in D
is uncommented. "setX(null)" is safe or changing the visibility of setX
to at least package-private or enabling static compilation for the call site prevents the interception as well. A warning could help bring awareness to this possibility.