Make getter/setter references local
Seen in the wild:
The following code gives infinite recursion:
class A {
string `prop() { return "A"; }
}
class B {
inherit A;
string `prop() { return ::prop + "B"; }
}
int main() {
werror("B: %O\n", B()->prop);
}
The cause being that the getter for prop
from A
is overloaded by the getter defined in B
.