diff --git a/src/Psalm/Type/Atomic/TSingleLetter.php b/src/Psalm/Type/Atomic/TSingleLetter.php index c12ad3d21..604e1ecbb 100644 --- a/src/Psalm/Type/Atomic/TSingleLetter.php +++ b/src/Psalm/Type/Atomic/TSingleLetter.php @@ -7,6 +7,6 @@ namespace Psalm\Type\Atomic; * * @psalm-immutable */ -final class TSingleLetter extends TString +final class TSingleLetter extends TNonEmptyString { } diff --git a/tests/ArrayAccessTest.php b/tests/ArrayAccessTest.php index 1a9a63f1b..01da42eb9 100644 --- a/tests/ArrayAccessTest.php +++ b/tests/ArrayAccessTest.php @@ -524,6 +524,15 @@ class ArrayAccessTest extends TestCase } }', ], + 'nonEmptyStringAccess' => [ + 'code' => ' [ + '$b===' => 'non-empty-string', + ], + ], 'notEmptyStringOffset' => [ 'code' => '