Skip to content

Instantly share code, notes, and snippets.

test.php:9:10,19: Typing error (Typing[4110])
test.php:3:30,33: This is a nullable type
test.php:9:19,19: It is incompatible with an int
$ hh_single_type_check test.php
File "test.php", line 7, characters 7-7:
Class B does not initialize all of its members; name is not always initialized.
Make sure you systematically set $this->name when the method __construct is called.
Alternatively, you can define the member as optional (?...)
(NastCheck[3015])
<?hh // decl
class T {
public function setType(): void {}
}