mirror of
https://github.com/danog/psalm.git
synced 2024-11-26 20:34:47 +01:00
Ignore cloning of mixed variables
This commit is contained in:
parent
2a8e51f544
commit
a67800cac7
@ -1697,7 +1697,10 @@ class ExpressionChecker
|
||||
|
||||
if (isset($stmt->expr->inferredType)) {
|
||||
foreach ($stmt->expr->inferredType->types as $clone_type_part) {
|
||||
if (!$clone_type_part instanceof TNamedObject && !$clone_type_part instanceof TObject) {
|
||||
if (!$clone_type_part instanceof TNamedObject &&
|
||||
!$clone_type_part instanceof TObject &&
|
||||
!$clone_type_part instanceof TMixed
|
||||
) {
|
||||
if (IssueBuffer::accepts(
|
||||
new InvalidClone(
|
||||
'Cannot clone ' . $clone_type_part,
|
||||
|
Loading…
Reference in New Issue
Block a user