You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to use an u64 (and other smaller types like u32, ...) value if a string format specifier with %d:
def _test_format_unboxed():
p = u64(4)
s = "p = %d" % p
The compiler wants a
ERROR: Error when compiling tf2 module: Type error
|
15 | s = "p = %d" % p
| ^
The type of the indicated expression (inferred to be __builtin__.u64) must be a subclass of __builtin__.int
Expected Behavior
Have the code work without the need to convert to int with int(p).
The text was updated successfully, but these errors were encountered:
Ah, this is one of the unfortunate effects of not having integer subtyping in place! We could possibly try fix it via overloading of print, but integer subtyping is something we're planning to support soon anyway. So I propose we defer the issue until then.
Acton Version
0.24.1.20250108.8.28.39
Steps to Reproduce and Observed Behavior
I would like to use an u64 (and other smaller types like u32, ...) value if a string format specifier with
%d
:The compiler wants a
Expected Behavior
Have the code work without the need to convert to int with
int(p)
.The text was updated successfully, but these errors were encountered: