What I am showing below, is rather a theoretical question. But I am interested in how the new C#7 compiler works and resolves local functions.
In C#7
As c# is a statically compiled language, i'd think all the functions are compiled before their encompassing scope is executed and therefor the innermost Main
cannot be declared because a Main
already exists from its' closure point of view (one level up).
Note that this is not based on factual evidence but just my initial thoughts on the matter.
After some research... I was wrong, mostly. My gut feeling does seem to imply the same behaviour, But not for the reasons I initially thought.
@PetSerAl already explained in comment form better than I could have copied it from manuals so I defer to that answer.