That's exactly what it - the compiler - did.... Try all the code yourself and you see why. He made a mess. It is not a compiler CRASH it is a fatal error because of the FOOD and it terminates gracefully with a nice error message.... Now... How Trump-like are you????
(I know you are not, but just in case: again this is about bad code and the compiler will not eat it. Check for yourself. You have my permission to fire him...)
ATM there is no dwim compiler.... It just says: ok if you f*(British u on the keyboard)ck up I'll have a tea break... and rightly so, because this was a REAL mess. And was fixed in 30 minutes.
Pointer mistakes by professionals. That was the post-mortem... I Lazarussed his code....