I have written a fair bit of code in Hack, but the typechecker manages to surprise me.
For example, the IDE complains on these two lines:
- https://github.com/ubbs/hack-lib-net/blob/master/src/IPv4Address.php#L30
- https://github.com/ubbs/hack-lib-net/blob/master/src/AbstractIPAddress.php#L93
The first clearly uses a string array and the second clearly returns an integer. Yet, the Nuclide IDE dives me this very unhelpful error message:
"Un-type checked code. Consider adding annotations."
Is this a bug / missing functionality in the typechecker or am I doing something wrong?