486c0a061c05a47b962f9a3ead7083081550a837

It might be situations where you specifically want to express that you override an inherited function. It makes the code easier to understand and you will get an error if you accidentally rename the parent function while refactoring. Like Java and many other languages you annotate the function with an override keyword. It looks like this in Hack:

<<Override>> protected function foo(): void {}

I would recommend using this when ever you are extending an library or class form a third party source. Especially if you override protected functions because the library internal API might not be as good documented in the change log.

The <<Override>> keyword could also be used with Traits and the new Trait requirements that I will talk about in the next few days.