Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bad error message when function is annotated with an empty tuple () #4646

Closed
KotlinIsland opened this issue Feb 6, 2023 · 0 comments
Closed

Comments

@KotlinIsland
Copy link
Contributor

def bar(a: ()): ...
*** Settings ***
Library  asdf

*** Test Cases ***
Asdf
    bar  1  # ValueError: Argument 'a' got value '1' that cannot be converted to .
@pekkaklarck pekkaklarck added this to the v6.1 milestone Feb 6, 2023
yanne pushed a commit that referenced this issue Mar 18, 2023
It is now an explicit error to use `a: Union` or `a: ()`.
The error message also explains that an empty union isn't allowed.
Fixes #4638. Fixes #4646.
@pekkaklarck pekkaklarck changed the title (🐞) Bad error message when function is annotated with an empty tuple () Bad error message when function is annotated with an empty tuple () Jun 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants