diff --git a/lib/PhpParser/ParserAbstract.php b/lib/PhpParser/ParserAbstract.php index 0600b98..c61208b 100644 --- a/lib/PhpParser/ParserAbstract.php +++ b/lib/PhpParser/ParserAbstract.php @@ -663,6 +663,7 @@ abstract class ParserAbstract implements Parser 'null' => true, 'false' => true, 'mixed' => true, + 'never' => true, ]; if (!$name->isUnqualified()) { diff --git a/test/code/parser/stmt/function/neverType.test b/test/code/parser/stmt/function/neverType.test new file mode 100644 index 0000000..7842e8a --- /dev/null +++ b/test/code/parser/stmt/function/neverType.test @@ -0,0 +1,23 @@ +Never type +----- +