Skip to content
This repository was archived by the owner on Sep 1, 2023. It is now read-only.

Commit 2b12b45

Browse files
committed
Replace non-refining instaoce $what with non-refining is_a()
1 parent cb8f6d0 commit 2b12b45

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/TypeSpec/__Private/InstanceOfSpec.hack

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ final class InstanceOfSpec<T> extends TypeSpec<T> {
2121

2222
<<__Override>>
2323
public function assertType(mixed $value): T {
24-
if ($value instanceof $this->what) {
24+
if (\is_a($value, $this->what)) {
2525
/* HH_IGNORE_ERROR[4110] unsafe for generics */
2626
return $value;
2727
}

0 commit comments

Comments
 (0)