in src/Assert.hack [393:414]
public function assertNotType(
string $expected,
mixed $actual,
string $message = '',
): void {
if (is_type($expected)) {
if (!(new Constraint\IsType($expected))->matches($actual)) {
return;
}
throw new ExpectationFailedException(
Str\format(
"%s\nFailed asserting that %s is not type %s",
$message,
\var_export($actual, true),
$expected,
),
);
} else if (\class_exists($expected) || \interface_exists($expected)) {
$this->assertNotInstanceOf($expected, $actual, $message);
}
throw new InvalidArgumentException('Invalid type');
}