I know someone at FB who worked on a project whose entire goal was to use compiler/type checker technology to prevent intentional and unintentional leaking of personal data in FB back-end code. If you can believe that. The project had a fair amount of resources and high-level support.
I don't know if it was a psy-op or deception campaign or what.
I think you're thinking of something else, but they also added "capabilities" to Hack (their main frontend language; it's a PHP fork) to make leaking data between requests or in logs painful.