Skip to content

Runtime type checking broken for *args and **kwargs #182

@sleiner

Description

@sleiner

Consider this example (derived from starlark/src/typing/tests/golden/types_of_args_kwargs.golden):

# reproducer.star
def foo(*args: str, **kwargs: int):
    pass

def test():
    foo("a")
    foo(b=1)

test()

This is valid code according to according to PEP 484, valid according to starlark-rust's static type checker (tested in typing::tests::call::test_types_of_args_kwargs), but unfortunately invalid when actually run with type checking.

Tested on bdc8f8e.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions