Hey! I'm an engineer working on Hack at Facebook. Super cool to see folks using it externally!
It looks like you've forgotten to run the typechecker on your code. HHVM doesn't actually enforce the full type system -- it only enforces the bits and pieces that it knows about, and only at runtime. We have a separate static analysis tool that does this enforcement, which must be run separately. It was designed to give instant feedback over all of your codebase -- not just what happens at runtime! So it can catch interesting edge cases that don't come up often in your code.
Our docs has instructions on getting the typechecker up and running. You should take a look! The typechecker is super useful. Furthermore, the behavior of code that doesn't pass the typechecker on HHVM is undefined -- it may happen to work right now, but it may randomly break later, we make no promises about it.
I went ahead and ran the typechecker on your project, and got many errors. Some of them were due to type errors or missing annotations, and some due to incorrect setup with regards to the hhi
files described in the documentation.
Sorry for the confusion on this. Lots of folks haven't realized they need to do this -- I'm working on a way to make this whole thing a lot easier. (I've already nearly removed the need for hhi
files, for example.)