This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?hh // strict | |
function returns_nullable(): ?int { | |
return null; | |
} | |
function use_nullable(): bool { | |
$value = returns_nullable(); | |
return $value > 1; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment