fix(compiler): 修复太空船运算符在 Windows 无法编译通过

pull/9/head
Yurun 2 months ago
parent df5dd2a5f6
commit b37ca14cb4
  1. 2
      src/Php/Parser/BinaryOpTrait.php

@ -465,7 +465,7 @@ trait BinaryOpTrait
protected function parseBinaryOpSpaceship(Expr\BinaryOp\Spaceship $expr): string
{
return $this->genBigNumericCmp($expr)
?? 'php::compare(' . $this->parseOrderedOperand($expr->left, false) . ', ' . $this->parseOrderedOperand($expr->right, false) . ')';
?? '(php::Int) php::compare(' . $this->parseOrderedOperand($expr->left, false) . ', ' . $this->parseOrderedOperand($expr->right, false) . ')';
}
protected function genBigNumericCmp(Expr\BinaryOp $expr, string $suffix = ''): ?string

Loading…
Cancel
Save