Skip to content

Commit

Permalink
Merge pull request #9638 from boesing/bugfix/intersection-type-type-a…
Browse files Browse the repository at this point in the history
…lias

Allow to intersect type alias with non-type-aliases
  • Loading branch information
orklah committed Apr 16, 2023
2 parents 2a6d9a8 + 26e201d commit 24dc5d4
Show file tree
Hide file tree
Showing 8 changed files with 295 additions and 137 deletions.
1 change: 0 additions & 1 deletion psalm-baseline.xml
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,6 @@
<PossiblyUndefinedIntArrayOffset>
<code>$const_name</code>
<code>$const_name</code>
<code>$intersection_types[0]</code>
<code><![CDATA[$parse_tree->children[0]]]></code>
<code><![CDATA[$parse_tree->condition->children[0]]]></code>
<code>array_keys($offset_template_data)[0]</code>
Expand Down
1 change: 1 addition & 0 deletions src/Psalm/Internal/Type/TypeExpander.php
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,7 @@ public static function expandAtomic(
];
}

/** @psalm-suppress DeprecatedProperty For backwards compatibility, we have to keep this here. */
foreach ($return_type->extra_types ?? [] as $alias) {
$more_recursively_fleshed_out_types = self::expandAtomic(
$codebase,
Expand Down

0 comments on commit 24dc5d4

Please sign in to comment.