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