diff --git a/src/Analyser/MutatingScope.php b/src/Analyser/MutatingScope.php index 5dcba31348..c3a289ec9b 100644 --- a/src/Analyser/MutatingScope.php +++ b/src/Analyser/MutatingScope.php @@ -695,12 +695,6 @@ private function resolveType(Expr $node): Type if ($type->isNonEmptyString()->yes()) { $accessories[] = new AccessoryNonEmptyStringType(); } - if ($type->isLiteralString()->yes()) { - $accessories[] = new AccessoryLiteralStringType(); - } - if ($type->isNumericString()->yes()) { - $accessories[] = new AccessoryNumericStringType(); - } return TypeCombinator::intersect(...$accessories); } diff --git a/tests/PHPStan/Analyser/data/bitwise-not.php b/tests/PHPStan/Analyser/data/bitwise-not.php index 5f4de7f654..a9e406d489 100644 --- a/tests/PHPStan/Analyser/data/bitwise-not.php +++ b/tests/PHPStan/Analyser/data/bitwise-not.php @@ -6,15 +6,11 @@ /** * @param string|int $stringOrInt - * @param numeric-string $numericString - * @param literal-string $literalString * @param non-empty-string $nonEmptyString */ function foo(int $int, string $string, float $float, $stringOrInt, $numericString, $literalString, string $nonEmptyString) : void{ assertType('int', ~$int); assertType('string', ~$string); - assertType('non-empty-string&numeric-string', ~$numericString); - assertType('literal-string', ~$literalString); assertType('non-empty-string', ~$nonEmptyString); assertType('int', ~$float); assertType('int|string', ~$stringOrInt);