Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions build/gen_stub.php
Original file line number Diff line number Diff line change
Expand Up @@ -2375,8 +2375,8 @@ protected function getTypeCode(string $variableLikeName, string &$code): string
$code .= "\t{$variableLikeType}_{$variableLikeName}_type_list->num_types = $classTypeCount;\n";

foreach ($arginfoType->classTypes as $k => $classType) {
$escapedClassName = $classType->toEscapedName();
$code .= "\t{$variableLikeType}_{$variableLikeName}_type_list->types[$k] = (zend_type) ZEND_TYPE_INIT_CLASS({$variableLikeType}_{$variableLikeName}_class_{$escapedClassName}, 0, 0);\n";
$varEscapedClassName = $classType->toVarEscapedName();
$code .= "\t{$variableLikeType}_{$variableLikeName}_type_list->types[$k] = (zend_type) ZEND_TYPE_INIT_CLASS({$variableLikeType}_{$variableLikeName}_class_{$varEscapedClassName}, 0, 0);\n";
}

$typeMaskCode = $this->type->toArginfoType()->toTypeMask();
Expand Down Expand Up @@ -4387,6 +4387,11 @@ private function handleStatements(array $stmts, PrettyPrinterAbstract $prettyPri
}
}

if ($stmt instanceof Stmt\Use_ || $stmt instanceof Stmt\GroupUse) {
// use statements are resolved by NameResolver before this point
continue;
}

throw new Exception("Unexpected node {$stmt->getType()}");
}
if (!empty($conds)) {
Expand Down
Loading