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

Error:Tuple from_py overload match problem #558

Closed
victor3d opened this issue May 10, 2024 · 2 comments
Closed

Error:Tuple from_py overload match problem #558

victor3d opened this issue May 10, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@victor3d
Copy link

The following code snippet will result in a compilation error

@python
def t3() -> tuple[pyobj, pyobj, pyobj]:
    return (1, 2, 3)

@python
def t2() -> tuple[pyobj, pyobj]:
    return (1, 2)

@python
def t33() -> tuple[pyobj, pyobj, pyobj]:
    return (1, 3, 5)

def test1(a, b, c):
    return a + b + c

def test2(a, b):
    return a + b 

print(test1(*t3()))
print(test2(*t2()))
print(test1(*t33()))
test_py_dec.py:10:1-41: error: 'Tuple[pyobj,pyobj,pyobj]' does not match expected type 'Tuple[T1,T2]'
╰─ test_py_dec.py:21:14-17: error: during the realization of t33()
@inumanag inumanag self-assigned this Sep 23, 2024
@inumanag
Copy link
Contributor

Hi @victor3d

Thank you for reporting this---looks like a typechecker bug. Will need to check what is going on here.

@inumanag inumanag added the bug Something isn't working label Sep 23, 2024
@inumanag
Copy link
Contributor

Fixed in #604.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants