Skip to content
This repository was archived by the owner on Aug 1, 2023. It is now read-only.

Improved support for nullables, tuples, shapes, and callables

Compare
Choose a tag to compare
@fredemmott fredemmott released this 30 Jun 20:06
2e9e924
  • ScannedTypehint::getTypeName() will never include the ? token
  • ScannedTypehint::isNullable() was previously returning true for any type containing a ? token; this is inaccurate for types such as tuple(?string, string). Fixed.
  • ScannedTypehint::getTypeName() will now return 'tuple', 'shape', 'callable' if appropriate; the full declaration is still available via ScannedTypehint::getTypeText()
  • callables and tuple type names and type text are no longer incorrectly prefixed with the current namespace
  • added support for the future use namespace syntax in Hack