Consider the following:
class A {}
class B {
def m(@DelegatesTo(value=A, strategy=Closure.DELEGATE_ONLY) Closure block) {
...
}
def x() {
m // delegate is A, owner is B
delegate
owner
}
}
}
"delegate:, "owner" and other members of Closure are showing as unknown (underlined). DELEGATE_ONLY should skip owner but still resolve against the enclosing closure.