To Reproduce
Steps to reproduce the behavior: copy-paste this script to the IDE
<?php
declare(strict_types=1);
namespace ns1\ns2;
interface Test12 {
public function fn1(int $par1): int;
}
class Test12b implements Test12, Test12 // this statement must trigger error
{
public function fn1(int $par1): int {}
}
class Test12c
{
public function fn1(Test12 | Test12 $par1): int {} // this statement must trigger error
public function fn2(Test12 & Test12 $par1): int {} // this statement must trigger error
public function fn3(int $par1): Test12 | Test12 {} // this statement must trigger error
public function fn4(int $par1): Test12 & Test12 {} // this statement must trigger error
}
trait Test12d
{
public function fn1(Test12 | Test12 $par1): int {} // this statement must trigger error
public function fn2(Test12 & Test12 $par1): int {} // this statement must trigger error
public function fn3(int $par1): Test12 | Test12 {} // this statement must trigger error
public function fn4(int $par1): Test12 & Test12 {} // this statement must trigger error
}
Bug Description Missing error on duplicate type on parameters/return value.
Eclipse environment Version: 2023-06 (4.28.0) Build id: 20230608-1333 PDT: 8.0.0.202306050832
System
To Reproduce Steps to reproduce the behavior: copy-paste this script to the IDE