Issue 9148 - 'pure' is broken

https://issues.dlang.org/show_bug.cgi?id=9148

A nested function inside `pure` function should also be typed as `pure`, and considered as weak purity function.
> There is no reason to infer purity if the function is not actually pure and this is just going to cause a compile time error.

Well, `foo1` is within a `pure` function, so inferring purity makes some sense. What _doesn't_ make sense IMHO is that the outer function be legally `pure` given that it has a mutable static variable in it. But assume for a moment that `foo1` is trying to access a global variable rather than a local static which shouldn't even be legal. If that were the case, then the outer function is properly `pure`, and it then becomes a question of whether it makes more sense for `foo1` to be inferred as `pure` (resulting in an error if it's not), or if it makes more sense for `foo1` to be inferred as impure and then be an error for being inside of a `pure` function. I'm not sure that it matters much which (though given what's going on with the outer function having a mutable static variable in it that it doesn't use, I suspect that the compiler would unfortunately only complain about an impure `foo1` being called rather than it being declared in the first place).