NRE from an "uninitialized this" in constructor

  1. Where compiler should report error, on call bar() on inside body of bar at c.length?
  2. Which function calls should be checked by compiler – only private inline? Actually there is no difference in that case between private inline and all others functions that have reference to leaking this (member or not)
  3. What if bar calls some other member function, that possibly access uninitialized c? Should compiler checks it’s body too?

Actually, as @Wasabi375 described, it’s possible to add such “cross-function” analysis, but it will lead to dramatically increasing of compilation time, because of each function call can run separate analysis of whole project, so it won’t be implemented in compiler. Current version of analysis works with O(LOC) asymptotic