ixid:
This is not OK: int fun5(int n) { int fun6(int n) { return n + 1; }return n.fun6; }
Unfortunately this is by design, and at the moment it's unlikely to change. And I think it's done this way to avoid troubles with code in class methods.
Bye, bearophile
