Skip to content

Fix int-range concat to behave like union of int types #13236

Fix int-range concat to behave like union of int types

Fix int-range concat to behave like union of int types #13236

Triggered via pull request May 7, 2024 12:23
Status Failure
Total duration 59s
Artifacts

shepherd.yml

on: pull_request
Fit to window
Zoom out
Zoom in

Annotations

3 errors
InvalidReturnType: src/Psalm/Internal/Analyzer/Statements/Expression/BinaryOp/ConcatAnalyzer.php#L509
src/Psalm/Internal/Analyzer/Statements/Expression/BinaryOp/ConcatAnalyzer.php:509:16: InvalidReturnType: The declared return type 'array<array-key, Psalm\Type\Atomic\TFalse|Psalm\Type\Atomic\TLiteralFloat|Psalm\Type\Atomic\TLiteralInt|Psalm\Type\Atomic\TLiteralString|Psalm\Type\Atomic\TTrue>' for Psalm\Internal\Analyzer\Statements\Expression\BinaryOp\ConcatAnalyzer::intRangeToInts is incorrect, got 'array<array-key, Psalm\Type\Atomic\TFalse|Psalm\Type\Atomic\TIntRange|Psalm\Type\Atomic\TLiteralFloat|Psalm\Type\Atomic\TLiteralInt|Psalm\Type\Atomic\TLiteralString|Psalm\Type\Atomic\TTrue>' (see https://psalm.dev/011)
InvalidReturnStatement: src/Psalm/Internal/Analyzer/Statements/Expression/BinaryOp/ConcatAnalyzer.php#L539
src/Psalm/Internal/Analyzer/Statements/Expression/BinaryOp/ConcatAnalyzer.php:539:16: InvalidReturnStatement: The inferred type 'array<array-key, Psalm\Type\Atomic\TFalse|Psalm\Type\Atomic\TIntRange|Psalm\Type\Atomic\TLiteralFloat|Psalm\Type\Atomic\TLiteralInt|Psalm\Type\Atomic\TLiteralString|Psalm\Type\Atomic\TTrue>' does not match the declared return type 'array<array-key, Psalm\Type\Atomic\TFalse|Psalm\Type\Atomic\TLiteralFloat|Psalm\Type\Atomic\TLiteralInt|Psalm\Type\Atomic\TLiteralString|Psalm\Type\Atomic\TTrue>' for Psalm\Internal\Analyzer\Statements\Expression\BinaryOp\ConcatAnalyzer::intRangeToInts (see https://psalm.dev/128)
build
Process completed with exit code 2.