The most flexible method is to declare a local, nested struct.... it's an awesome solution.
It is a solution, but IMO it looks unpleasant. Reminds me C++, where I had to do this trick all the time.
It's a morass of special cases.
If D had a notion of pure pure functions - pure functions without any "concessions to practicality" then we could consider this simple rule:
"local pure pure functions can be forward referenced".
