Fix int-range concat to behave like union of int types #793
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.
|