1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-27 04:45:20 +01:00

Experiment with implode literal tracking

This commit is contained in:
Matt Brown 2021-06-14 16:03:37 -04:00
parent 4941b9e5d2
commit 3140654a44
2 changed files with 2 additions and 3 deletions

View File

@ -571,7 +571,7 @@ function rtrim(string $str, string $character_mask = " \t\n\r\0\x0B") : string {
* @return (
* $glue is non-empty-string
* ? ($pieces is non-empty-array
* ? non-empty-string
* ? ($pieces is array<literal-string> ? non-empty-literal-string : non-empty-string)
* : string)
* : string
* )

View File

@ -919,11 +919,10 @@ class ArrayFunctionCallTest extends TestCase
],
'implodeNonEmptyArrayAndString' => [
'<?php
/** @var non-empty-array<non-empty-string> */
$l = ["a", "b"];
$a = implode(":", $l);',
[
'$a===' => 'non-empty-string',
'$a===' => 'non-empty-literal-string',
]
],
'key' => [