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'm not sure, are non-default arguments in acton allowed to follow default arguments in methods, functions definitions? If yes, then compiler error message for a method is a bit misleading, referring to a tuple. Or if this is not allowed, then the compiler should flag the definition, not the call site.
Method with non-default arguments following defaults
class Bob:
def __init__(self, first: ?str=None, second: int):
pass
def _test_bob():
ba = Bob(42)
bb = Bob(second=42) # this works!
ERROR: Error when compiling tf2 module: Type error
|
24 | ba = Bob(42)
| ^^^^^^^
keyword component(s) 'second' is not defined in tuple
Function with non-default arguments following defaults
The message is better when a function with the same order of arguments is defined:
Acton Version
0.24.1.20250110.11.13.23
Steps to Reproduce and Observed Behavior
I'm not sure, are non-default arguments in acton allowed to follow default arguments in methods, functions definitions? If yes, then compiler error message for a method is a bit misleading, referring to a tuple. Or if this is not allowed, then the compiler should flag the definition, not the call site.
Method with non-default arguments following defaults
Function with non-default arguments following defaults
The message is better when a function with the same order of arguments is defined:
Expected Behavior
Either way, improve the compiler error messages.
The text was updated successfully, but these errors were encountered: