1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-26 20:34:47 +01:00

Remove unnecessary suppression

This commit is contained in:
Matthew Brown 2017-12-31 13:12:19 -05:00
parent 17d208bdd5
commit 290cf396d4
3 changed files with 16 additions and 2 deletions

View File

@ -792,7 +792,6 @@ class FunctionChecker extends FunctionLikeChecker
* @return array<string, array<int|string, string>>
* @psalm-suppress MixedInferredReturnType as the use of require buggers things up
* @psalm-suppress MixedAssignment
* @psalm-suppress MoreSpecificReturnType
*/
protected static function getCallMap()
{

View File

@ -26,7 +26,6 @@ class AssertionFinder
* @param StatementsSource $source
*
* @return array<string, string>
* @psalm-suppress MoreSpecificReturnType
*/
public static function getAssertions(
PhpParser\Node\Expr $conditional,

View File

@ -608,6 +608,22 @@ class ReturnTypeTest extends TestCase
}',
'error_message' => 'InvalidReturnStatement',
],
'moreSpecificReturnType' => [
'<?php
class A {}
class B extends A {}
interface I {
/** @return B[] */
public function foo();
}
class D implements I {
/** @return A[] */
public function foo() {
return [new A, new A];
}
}',
'error_message' => 'MoreSpecificImplementedReturnType',
],
];
}
}