mirror of
https://github.com/danog/psalm.git
synced 2024-11-30 04:39:00 +01:00
parent
2b060b75d3
commit
346d475f55
@ -595,7 +595,11 @@ class NewAnalyzer extends \Psalm\Internal\Analyzer\Statements\Expression\CallAna
|
||||
$template_result->upper_bounds
|
||||
);
|
||||
} else {
|
||||
$generic_param_type = array_values($base_type)[0][0];
|
||||
if ($fq_class_name === 'SplObjectStorage') {
|
||||
$generic_param_type = Type::getEmpty();
|
||||
} else {
|
||||
$generic_param_type = array_values($base_type)[0][0];
|
||||
}
|
||||
}
|
||||
|
||||
$generic_param_type->had_template = true;
|
||||
|
@ -910,6 +910,13 @@ class MethodCallTest extends TestCase
|
||||
echo strlen($a->getValue());
|
||||
}',
|
||||
],
|
||||
'newSplObjectStorageDefaultEmpty' => [
|
||||
'<?php
|
||||
$a = new SplObjectStorage();',
|
||||
[
|
||||
'$a' => 'SplObjectStorage<empty, empty>',
|
||||
]
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user