I get this Error:
Fatal error: Uncaught TypeError: Argument 1 passed to HH\Lib\Str\format() must be an instance of HH\FormatString, string given, called in [...]/hacktophp/generated-php/src/__Private/SubprocessException.php on line 25 and defined in [...]/hsl-php/generated-php/src/str/format.php on line 157
This is because
<?hh
type SprintfFormatString = \HH\FormatString<SprintfFormat>;
<<__Rx>>
function format(
SprintfFormatString $format_string,
mixed ...$format_args
): string {
/* HH_IGNORE_ERROR[2049] __PHPStdLib */
/* HH_IGNORE_ERROR[4107] __PHPStdLib */
return \vsprintf($format_string, $format_args);
}
is converted to
<?php
/**
* @param \HH\FormatString<SprintfFormat> $format_string
* @param mixed ...$format_args
*/
function format(\HH\FormatString $format_string, ...$format_args) : string
{
return \vsprintf($format_string, $format_args);
}
So far actually right, only FormatString is not a class.
It is builtin code?
/tmp/hh_server/hhi_833e78d/typenames.hhi:
namespace HH {
newtype FormatString<T> = string;
}
I don't know if you can autodetect such special cases
I get this Error:
This is because
is converted to
So far actually right, only FormatString is not a class.
It is builtin code?
/tmp/hh_server/hhi_833e78d/typenames.hhi:
I don't know if you can autodetect such special cases