Consider the following example.
As expected this does not warn about reflection. The following example shows the same scenario for a primitive function.
So the behavior of external type hints is inconsistent for regular functions and primitive functions.
Most likely, the external type hint information is somehow ignored for primitive functions since the case where they return no primitive value is not treated separately.