Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Fix symbolic pass for printing ListItem #2620

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

Merged
merged 7 commits into from
Mar 23, 2024

Conversation

kmr-srbh
Copy link
Contributor

fixes #2613

from lpython import i32

A: list[i32] = [1, 2, 4, 5]
print(A[0], A[1], A[2], "...", A[-3], A[-2], A[-1])
(base) saurabh-kumar@Awadh:~/Projects/System/lpython$ ./src/bin/lpython ./examples/example.py
1 2 4 ... 2 4 5

Copy link
Collaborator

@ubaidsk ubaidsk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add an integration test for this with print and assert statements.

@ubaidsk ubaidsk marked this pull request as draft March 23, 2024 13:06
@kmr-srbh kmr-srbh marked this pull request as ready for review March 23, 2024 15:24
@kmr-srbh kmr-srbh requested a review from ubaidsk March 23, 2024 15:24
Copy link
Collaborator

@ubaidsk ubaidsk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this! I shared few comments. It looks good overall.

@ubaidsk ubaidsk marked this pull request as draft March 23, 2024 15:32
kmr-srbh and others added 2 commits March 23, 2024 21:10
Co-authored-by: Shaikh Ubaid <[email protected]>
Co-authored-by: Shaikh Ubaid <[email protected]>
@kmr-srbh kmr-srbh marked this pull request as ready for review March 23, 2024 16:03
@kmr-srbh kmr-srbh requested a review from ubaidsk March 23, 2024 16:03
Copy link
Collaborator

@ubaidsk ubaidsk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks good! Thanks! Great work!

@ubaidsk ubaidsk merged commit 4dbbf93 into lcompilers:main Mar 23, 2024
@kmr-srbh kmr-srbh deleted the fix-list-item-symbolic-pass branch March 26, 2024 18:17
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.

Negative indices in list fails
2 participants