Skip to content

Commit

Permalink
fix issue vimeo#6937
Browse files Browse the repository at this point in the history
  • Loading branch information
ptomulik committed Nov 18, 2021
1 parent 6097e02 commit 29234dc
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions tests/ReturnTypeTest.php
Expand Up @@ -1002,6 +1002,37 @@ function a($end): void{
}
}'
],
'returnTypeOfAbstractAndConcreteMethodInSiblingTraits' => [
'<?php
/** @template T */
trait AggregateTrait {
/** @var T */
private $value;
/** @psalm-return T */
public function getValue() {
return $this->value;
}
}
/** @template T */
trait AnotherTrait {
/** @psalm-return T */
abstract public function getValue();
}
class Test {
/** @use AggregateTrait<int> */
use AggregateTrait;
/** @use AnotherTrait<int> */
use AnotherTrait;
public function __construct() {
$this->value = 123;
}
}'
]
];
}

Expand Down

0 comments on commit 29234dc

Please sign in to comment.