Skip to content
Permalink
Browse files

Fix typo in isAtomicContainedBy

  • Loading branch information...
bugreportuser authored and muglug committed Apr 26, 2019
1 parent e15b86d commit 1c160dab131d1ab4f1acabfc22dcd80b7aeafdfe
Showing with 5 additions and 1 deletion.
  1. +1 −1 src/Psalm/Internal/Analyzer/TypeAnalyzer.php
  2. +4 −0 tests/ArrayAccessTest.php
@@ -946,7 +946,7 @@ public static function isAtomicContainedBy(
return false;
}
if ((get_class($input_type_part) === TString::class || get_class($container_type_part) === TSingleLetter::class)
if ((get_class($input_type_part) === TString::class || get_class($input_type_part) === TSingleLetter::class)
&& $container_type_part instanceof TLiteralString
) {
$type_coerced = true;
@@ -437,6 +437,10 @@ public function offsetUnset($offset) : void
/** @psalm-suppress PossiblyInvalidArrayAssignment */
$array["key"][] = "testing";'
],
'singleLetterOffset' => [
'<?php
["s" => "str"]["str"[0]];',
],
];
}

0 comments on commit 1c160da

Please sign in to comment.
You can’t perform that action at this time.