Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to intersect type alias with non-type-aliases #9638

Merged
merged 8 commits into from
Apr 16, 2023
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