Skip to content

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

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

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

Triggered via push May 7, 2024 10:11
Status Failure
Total duration 1m 21s
Artifacts

shepherd.yml

on: push
Fit to window
Zoom out
Zoom in

Annotations

3 errors
MoreSpecificReturnType: src/Psalm/Internal/Analyzer/Statements/Expression/BinaryOp/ConcatAnalyzer.php#L509
src/Psalm/Internal/Analyzer/Statements/Expression/BinaryOp/ConcatAnalyzer.php:509:16: MoreSpecificReturnType: 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 more specific than the inferred return type 'array<array-key, Psalm\Type\Atomic>' (see https://psalm.dev/070)
LessSpecificReturnStatement: src/Psalm/Internal/Analyzer/Statements/Expression/BinaryOp/ConcatAnalyzer.php#L538
src/Psalm/Internal/Analyzer/Statements/Expression/BinaryOp/ConcatAnalyzer.php:538:16: LessSpecificReturnStatement: The type 'array<array-key, Psalm\Type\Atomic|Psalm\Type\Atomic\TFalse|Psalm\Type\Atomic\TIntRange|Psalm\Type\Atomic\TLiteralFloat|Psalm\Type\Atomic\TLiteralInt|Psalm\Type\Atomic\TLiteralString|Psalm\Type\Atomic\TTrue>' is more general than 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/129)
build
Process completed with exit code 2.