diff --git a/src/Php/AstNodeType.php b/src/Php/AstNodeType.php index e27b5140..46f9b2a1 100644 --- a/src/Php/AstNodeType.php +++ b/src/Php/AstNodeType.php @@ -145,6 +145,6 @@ trait AstNodeType protected function isNull(NodeAbstract $expr): bool { - return $expr instanceof Node\Expr\ConstFetch && $expr->name->toString() === 'null'; + return $expr instanceof Expr\ConstFetch && $expr->name->toString() === 'null'; } } diff --git a/src/Php/Translator.php b/src/Php/Translator.php index 9a37973b..da4b0bed 100644 --- a/src/Php/Translator.php +++ b/src/Php/Translator.php @@ -1247,6 +1247,11 @@ class Translator extends Preprocessor return $code; } + protected function parseTrait(Node\Stmt\Trait_ $trait) + { + throw new Unsupported('Unsupported Trait '); + } + private function getRegisterClassFunctionArgDef(ClassDef|InterfaceDef $classDef): string { $depsCeList = $this->getRegisterClassFunctionCeList($classDef); @@ -1367,9 +1372,4 @@ class Translator extends Preprocessor return $code; } - - protected function parseTrait(Node\Stmt\Trait_ $trait) - { - throw new Unsupported('Unsupported Trait '); - } } diff --git a/tests/aot/ref/002.phpt b/tests/aot/ref/002.phpt new file mode 100644 index 00000000..94da74bb --- /dev/null +++ b/tests/aot/ref/002.phpt @@ -0,0 +1,23 @@ +--TEST-- +ref 002 +--FILE-- + +--EXPECT-- +array(4) { + [0]=> + int(1) + [1]=> + int(2) + [2]=> + int(3) + [3]=> + int(5) +} \ No newline at end of file