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

Add support for tuple and set in intrinsic type(object) #2687

Merged
merged 8 commits into from
May 7, 2024

Conversation

kmr-srbh
Copy link
Contributor

@kmr-srbh kmr-srbh commented May 6, 2024

my_tuple: tuple[str, i32] = ("A", 1)
my_set: set[str] = {"A", "B", "C"}

print(type(my_tuple))
print(type(my_set))
(lp) saurabh-kumar@Awadh:~/Projects/System/lpython$ ./src/bin/lpython ./examples/example.py
<class 'tuple'>
<class 'set'>

@Shaikh-Ubaid
Copy link
Collaborator

It looks like there is a failure at the CI.

@Shaikh-Ubaid Shaikh-Ubaid marked this pull request as draft May 6, 2024 08:05
@kmr-srbh
Copy link
Contributor Author

kmr-srbh commented May 6, 2024

It looks like there is a failure at the CI.

Yes @Shaikh-Ubaid. It seems we are having empty printf("") statements in the generated code for C back-end. The issue occurs when printing list and tuple. This issue was not present before, but is consistently occurring in the recent PRs related to data-structures.

@kmr-srbh
Copy link
Contributor Author

kmr-srbh commented May 6, 2024

Removed the C back-end from tests as set is not implemented for it.

@kmr-srbh kmr-srbh marked this pull request as ready for review May 6, 2024 15:05
@Shaikh-Ubaid Shaikh-Ubaid marked this pull request as draft May 6, 2024 15:42
@kmr-srbh kmr-srbh marked this pull request as ready for review May 7, 2024 06:10
@kmr-srbh kmr-srbh requested a review from Shaikh-Ubaid May 7, 2024 07:19
@Shaikh-Ubaid Shaikh-Ubaid merged commit cce1200 into lcompilers:main May 7, 2024
14 checks passed
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 this pull request may close these issues.

2 participants