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

Closed
yurunsoft wants to merge 1 commits from fix-spaceship-windows into master
  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