Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public function specifyTypes(

return $this->typeSpecifier->create(
$arrayArg,
TypeCombinator::intersect(TypeCombinator::intersect(new ArrayType(new MixedType(), new MixedType()), $scope->getType($arrayArg)), new NonEmptyArrayType()),
TypeCombinator::intersect(new ArrayType(new MixedType(), new MixedType()), new NonEmptyArrayType()),
$context,
false,
$scope,
Expand Down
10 changes: 10 additions & 0 deletions tests/PHPStan/Analyser/AnalyserIntegrationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -1017,6 +1017,16 @@ public function testBug3865(): void
$this->assertSame(14, $errors[0]->getLine());
}

public function testBug8147(): void
{
if (PHP_VERSION_ID < 80000) {
$this->markTestSkipped('Test requires PHP 8.0.');
}

$errors = $this->runAnalyse(__DIR__ . '/data/bug-8147.php');
$this->assertNoErrors($errors);
}

/**
* @param string[]|null $allAnalysedFiles
* @return Error[]
Expand Down
Loading