mirror of
https://github.com/danog/psalm.git
synced 2024-11-27 04:45:20 +01:00
Real fix
This commit is contained in:
parent
ebd5727dec
commit
a8ef02db5a
@ -162,7 +162,7 @@ abstract class Atomic implements TypeNode
|
||||
?string $text = null,
|
||||
bool $from_docblock = false
|
||||
): Atomic {
|
||||
$result = self::createInner($value, $analysis_php_version_id, $template_type_map, $type_aliases);
|
||||
$result = self::createInner($value, $analysis_php_version_id, $template_type_map, $type_aliases, $from_docblock);
|
||||
$result->offset_start = $offset_start;
|
||||
$result->offset_end = $offset_end;
|
||||
$result->text = $text;
|
||||
|
@ -234,7 +234,7 @@ final class MutableUnion implements TypeNode
|
||||
$this->typed_class_strings = [];
|
||||
$this->checked = false;
|
||||
|
||||
$from_docblock = $this->from_docblock;
|
||||
$from_docblock = false;
|
||||
$keyed_types = [];
|
||||
|
||||
foreach ($types as $type) {
|
||||
|
@ -1085,7 +1085,7 @@ class RedundantConditionTest extends TestCase
|
||||
/** @psalm-suppress PossiblyNullArgument */
|
||||
takesA($a);
|
||||
if ($a instanceof A) {}',
|
||||
'error_message' => 'RedundantConditionGivenDocblockType - src' . DIRECTORY_SEPARATOR . 'somefile.php:15',
|
||||
'error_message' => 'RedundantCondition - src' . DIRECTORY_SEPARATOR . 'somefile.php:15',
|
||||
],
|
||||
'replaceFalseType' => [
|
||||
'code' => '<?php
|
||||
|
Loading…
Reference in New Issue
Block a user