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've been looking to add more python style function calls where you can mix both have positional arguments and keyword arguments.
It almost works already 😄 except type checking is not done for positional arguments in the caller. Inside the function it works well.
---@paramargs{a: integer, b: integer|nil, test: string}localfunctiontest_no_pos(args)
-- these are correctly typedlocala=args.alocalb=args.bend-- everything works correctlytest_no_pos {a="23", b="2", test="string"} -- correctly errors on a,btest_no_pos({a="23", b="2", test="string"}) -- correctly errors on a,b---@paramargs{[1]: integer, [2]: integer|nil, test: string}localfunctiontest_pos(args)
-- these are also correctly typedlocala=args[1]
localb=args[2]
endtest_pos {"23", "2", test="string"} -- does not errortest_pos({"23", "2", test="string"}) -- does not error
The text was updated successfully, but these errors were encountered:
I've been looking to add more python style function calls where you can mix both have positional arguments and keyword arguments.
It almost works already 😄 except type checking is not done for positional arguments in the caller. Inside the function it works well.
The text was updated successfully, but these errors were encountered: