mirror of
https://github.com/danog/psalm.git
synced 2024-11-30 04:39:00 +01:00
Improve template handling robustness
This commit is contained in:
parent
5cb6fe14d7
commit
d96246a824
@ -660,7 +660,15 @@ abstract class FunctionLikeAnalyzer extends SourceAnalyzer implements Statements
|
||||
&& !TypeAnalyzer::isContainedBy(
|
||||
$codebase,
|
||||
$default_type,
|
||||
$param_type
|
||||
$param_type,
|
||||
false,
|
||||
false,
|
||||
$has_scalar_match,
|
||||
$type_coerced,
|
||||
$type_coerced_from_mixed,
|
||||
$to_string_cast,
|
||||
$type_coerced_from_scalar,
|
||||
true
|
||||
)
|
||||
) {
|
||||
if (IssueBuffer::accepts(
|
||||
|
@ -127,7 +127,8 @@ class NewAnalyzer extends \Psalm\Internal\Analyzer\Statements\Expression\CallAna
|
||||
$lhs_type_part->param_name,
|
||||
$lhs_type_part->as_type
|
||||
? new Type\Union([$lhs_type_part->as_type])
|
||||
: Type::parseString($lhs_type_part->as)
|
||||
: Type::parseString($lhs_type_part->as),
|
||||
$lhs_type_part->defining_class
|
||||
);
|
||||
|
||||
if ($new_type) {
|
||||
|
@ -620,6 +620,8 @@ class Populator
|
||||
}
|
||||
}
|
||||
|
||||
$parent_interface_storage->dependent_classlikes[strtolower($storage->name)] = true;
|
||||
|
||||
$parent_interfaces = array_merge($parent_interfaces, $parent_interface_storage->parent_interfaces);
|
||||
|
||||
$this->inheritMethodsFromParent($storage, $parent_interface_storage);
|
||||
|
Loading…
Reference in New Issue
Block a user