1.1 --- a/translator.py Sat May 25 17:55:37 2024 +0200
1.2 +++ b/translator.py Sat May 25 18:02:58 2024 +0200
1.3 @@ -1287,7 +1287,9 @@
1.4
1.5 # NOTE: Special case for optimisation.
1.6
1.7 - yields_integer = target and objpath == "native.int.is_int"
1.8 + int_type = "__builtins__.int.int"
1.9 + result_type = target and objpath == "native.int.is_int" and int_type or None
1.10 + yields_integer = result_type == int_type
1.11
1.12 # Arguments are presented in a temporary frame array with any context
1.13 # always being the first argument. Where it would be unused, it may be
1.14 @@ -1500,8 +1502,8 @@
1.15 # Provide the parameter details for possible optimisation when
1.16 # translating the result.
1.17
1.18 - return InvocationResult(stages,
1.19 - yields_integer and final_args or None)
1.20 + return InvocationResult(stages, result_type,
1.21 + result_type and final_args or None)
1.22
1.23 # With unknown targets, the generic invocation function is applied to
1.24 # the callable and argument collections.