fix(php): 修复表达式类型检测中的缺失情况

- 添加了对 Expr_Print 表达式的类型检测支持
- 确保类型推断的一致性
pull/1/head
韩天峰 2 months ago
parent 8517481c52
commit 6849c56cc2
  1. 1
      src/Php/CompilerBase.php

@ -1890,6 +1890,7 @@ class CompilerBase extends \PhpAot\Core\Translator
case 'Expr_BitwiseNot':
$inner = $this->detectTypeOfExpr($expr->expr);
return $inner === self::TYPE_BIGINT ? self::TYPE_BIGINT : self::TYPE_INT;
case 'Expr_Print':
case 'Expr_Cast_Int':
return self::TYPE_INT;
case 'Scalar_Int':

Loading…
Cancel
Save