eclipse-pdt / pdt

PHP Development Tools project (PDT)
https://eclipse.org/pdt
Eclipse Public License 2.0
189 stars 46 forks source link

Missing error on mismatch variadic param on derived method #183

Open the-liquid-metal opened 1 year ago

the-liquid-metal commented 1 year ago

Bug Description Missing error on mismatch variadic param on derived method.

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

<?php
declare(strict_types=1);

namespace ns1\ns2;

interface Test07 {
    public function fn1(int ...$par1): int;
    public function fn2(int $par1): int;
}

interface Test07b extends Test07
{
    public function fn1(int $par1): int;    // this statement must trigger error
    public function fn2(int ...$par1): int; // this statement must trigger error
}

// -------------------------------------------------------------------------

class Test07c {
    public function fn1(int ...$par1): int {}
    public function fn2(int $par1): int {}
}

class Test07d extends Test07c
{
    public function fn1(int $par1): int {}    // this statement must trigger error
    public function fn2(int ...$par1): int {} // this statement must trigger error
}

// -------------------------------------------------------------------------

interface Test07e {
    public function fn1(int ...$par1): int;
    public function fn2(int $par1): int;
}

class Test07f implements Test07e
{
    public function fn1(int $par1): int {}    // this statement must trigger error
    public function fn2(int ...$par1): int {} // this statement must trigger error
}

// -------------------------------------------------------------------------

trait Test07g {
    public function fn1(int ...$par1): int {}
    public function fn2(int $par1): int {}
}

class Test07h {
    use Test07g;
}

class Test07i extends Test07h
{
    public function fn1(int $par1): int {}    // this statement must trigger error
    public function fn2(int ...$par1): int {} // this statement must trigger error
}