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

Support Tuple Concat like List Concat #1831

Closed
faze-geek opened this issue May 18, 2023 · 0 comments · Fixed by #1865
Closed

Support Tuple Concat like List Concat #1831

faze-geek opened this issue May 18, 2023 · 0 comments · Fixed by #1865
Assignees

Comments

@faze-geek
Copy link
Contributor

def d():               # List Concat using + is supported in Lpython
    t1:tuple[i32,i32] = (1,2)
    t2:tuple[i32,i32] = (2,3)
    t3:tuple[i32,i32,i32,i32] = t1+t2
    print(t3)

d()
(lp) faze-geek@DESKTOP-497JDCU:~/lpython/lpython$ python try.py
(1, 2, 2, 3)

(lp) faze-geek@DESKTOP-497JDCU:~/lpython/lpython$ ./src/bin/lpython try.py
semantic error: Type mismatch in binary operator; the types must be compatible
 --> try.py:4:33
  |
4 |     t3:tuple[i32,i32,i32,i32] = t1+t2
  |                                 ^^ ^^ type mismatch (tuple[i32, i32] and tuple[i32, i32])
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

Successfully merging a pull request may close this issue.

2 participants