1.1 --- a/translator.py Sat May 25 17:55:55 2024 +0200
1.2 +++ b/translator.py Sat May 25 18:05:52 2024 +0200
1.3 @@ -1319,7 +1319,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 # Employ result targets only in functions.
1.13
1.14 @@ -1556,8 +1558,8 @@
1.15 # Provide the parameter details for possible optimisation when
1.16 # translating the result.
1.17
1.18 - return InvocationResult(result_target, stages,
1.19 - yields_integer and final_args or None)
1.20 + return InvocationResult(result_target, 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.