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

Open
victor3d opened this issue May 10, 2024 · 0 comments
Open

Error:Tuple from_py overload match problem #558

victor3d opened this issue May 10, 2024 · 0 comments

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()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant