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

Fixes handling of while loop during pass #1570

Merged
merged 3 commits into from
Mar 10, 2023

Conversation

anutosh491
Copy link
Collaborator

Fixes #1569

def f():                                            
    j :i32 = 0
    while True:
        j = j + 1
        print(j)
        if(j>4):
            break
    print("out of outer loop")
f()

On Branch

(lp) C:\Users\kunni\lpython>lpython try.py
1
2
3
4
5
out of outer loop

On Master

(lp) C:\Users\kunni\lpython>src\bin\lpython try.py
1
2
3
4
5
5
5
out of outer loop

integration_tests/loop_05.py Outdated Show resolved Hide resolved
integration_tests/loop_05.py Show resolved Hide resolved
@czgdp1807 czgdp1807 marked this pull request as draft March 9, 2023 17:21
@anutosh491 anutosh491 marked this pull request as ready for review March 10, 2023 03:43
@czgdp1807 czgdp1807 merged commit ffdd221 into lcompilers:main Mar 10, 2023
@anutosh491 anutosh491 deleted the branch08 branch March 10, 2023 08:55
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.

Incorrect result of print inside do loop
2 participants