Hi,
I found this issue:
<?php
declare(strict_types=1);
namespace Devsense\Generics\Interfaces;
interface MyInt {}
abstract class MyBase {}
final class ClassA extends MyBase implements MyInt {}
final class ClassB extends MyBase implements MyInt {}
/**
* @template O of MyBase
*/
abstract class MyParent
{
/**
* @param O[] $objects
*/
public function test(MyParent ...$objects): void {}
}
/**
* @template O of MyInt
* @extends MyParent<O>
*/
final class MyClassA extends MyParent {}
$a = new MyClassA();
$a->test(
new ClassA(),
new ClassA(),
new ClassB(),
new ClassB(),
);
/**
* @template D of MyInt
* @extends MyParent<D>
*/
final class MyClassB extends MyParent {}
$b = new MyClassB();
$b->test(
new ClassA(),
new ClassA(),
new ClassB(),
new ClassB(),
);

FYI, I got this issue when my classes and interfaces are in different files.
The example above allows to reproduce the same issue.
Thank you for the fix.