pdt
pdt copied to clipboard
Missing error on incorrect default value order
Bug Description Missing error on incorrect default value order.
Eclipse environment Version: 2023-06 (4.28.0) Build id: 20230608-1333 PDT: 8.0.0.202306050832
System
- PHP Version: 8.2.7, 8.1.20, 8.0.29, 7.4.33 (via https://onlinephp.io/)
To Reproduce Steps to reproduce the behavior: copy-paste this script to the IDE
<?php
declare(strict_types=1);
namespace ns1\ns2;
class Test16 {
public function fn1(
int $par1,
int $par2 = 10, // this statement must trigger error
int $par3,
) {}
}
function fn1(
int $par1,
int $par2 = 10, // this statement must trigger error
int $par3,
) {}
$var1 = function(
int $par1,
int $par2 = 10, // this statement must trigger error
int $par3,
) {};
$var2 = fn(
int $par1,
int $par2 = 10, // this statement must trigger error
int $par3,
) => 10;
var_dump($var1, $var2);