UFCS and function scope

bearophile bearophileHUGS at lycos.com
Thu Aug 15 14:11:14 PDT 2013


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


More information about the Digitalmars-d-learn mailing list