Open
Description
This test should pass, but doesnt, because when the compiler knows args
as : object
, it just bails on the * operator. At a minimum, it should be trying to explicitly unpack all arguments, and if it can't, should be deferring to the interpreter. Conceivably we could do better than this in cases where *args or **kwargs just get passed through directly to another function, although that's not a particularly high-value use case.
def test_star_args_with_object(self):
def f(*args):
return len(args)
@Entrypoint
def callF(args1: object, arg2, args3: object):
return f(*args1, arg2, *args3)
assert callF((1, 2), 3, (4, 5, 6)) == 6