mirror of
https://github.com/danog/psalm.git
synced 2024-11-27 12:55:26 +01:00
Fixup!!! only allow general TInt to pass
This commit is contained in:
parent
950710a47a
commit
3fc8139205
@ -1185,7 +1185,7 @@ class AssertionReconciler extends Reconciler
|
||||
}
|
||||
|
||||
/**
|
||||
* @param list<Atomic> $existing_var_atomic_types
|
||||
* @param array<string, Atomic> $existing_var_atomic_types
|
||||
* @param string[] $suppressed_issues
|
||||
*/
|
||||
private static function handleLiteralEqualityWithInt(
|
||||
@ -1243,7 +1243,7 @@ class AssertionReconciler extends Reconciler
|
||||
return new Union([new TLiteralInt($value)]);
|
||||
}
|
||||
|
||||
if ($existing_var_atomic_type instanceof TInt) {
|
||||
if (get_class($existing_var_atomic_type) === TInt::class) {
|
||||
return new Union([new TLiteralInt($value)]);
|
||||
}
|
||||
|
||||
@ -1300,7 +1300,7 @@ class AssertionReconciler extends Reconciler
|
||||
}
|
||||
|
||||
/**
|
||||
* @param list<Atomic> $existing_var_atomic_types
|
||||
* @param array<string, Atomic> $existing_var_atomic_types
|
||||
* @param string[] $suppressed_issues
|
||||
*/
|
||||
private static function handleLiteralEqualityWithString(
|
||||
@ -1432,7 +1432,7 @@ class AssertionReconciler extends Reconciler
|
||||
}
|
||||
|
||||
/**
|
||||
* @param list<Atomic> $existing_var_atomic_types
|
||||
* @param array<string, Atomic> $existing_var_atomic_types
|
||||
*/
|
||||
private static function getCompatibleIntType(
|
||||
Union $existing_var_type,
|
||||
@ -1458,7 +1458,7 @@ class AssertionReconciler extends Reconciler
|
||||
}
|
||||
|
||||
/**
|
||||
* @param list<Atomic> $existing_var_atomic_types
|
||||
* @param array<string, Atomic> $existing_var_atomic_types
|
||||
*/
|
||||
private static function getCompatibleStringType(
|
||||
Union $existing_var_type,
|
||||
|
Loading…
Reference in New Issue
Block a user