1
0
mirror of https://github.com/danog/psalm.git synced 2024-12-05 21:19:03 +01:00
psalm/docs/running_psalm/issues/PossiblyInvalidClone.md
Evgeniy 04a576708c
Correct analyze clone expression (#3382)
* Correct analyze clone, add PossibleInvalidClone issue type

* Infer mixed type when possible incorrect clone

* Remove unused variable
2020-05-18 16:22:50 -04:00

17 lines
194 B
Markdown

# PossiblyInvalidClone
Emitted when trying to clone a value that's possibly not cloneable
```php
<?php
class A {}
/**
* @param A|string $a
*/
function foo($a) {
return clone $a;
}
```