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

Else condition after a newline gets skipped #108

Closed
lakshgupta opened this issue Jun 24, 2024 · 1 comment
Closed

Else condition after a newline gets skipped #108

lakshgupta opened this issue Jun 24, 2024 · 1 comment
Labels
bug Something isn't working compiler Related with compiler/compile-time

Comments

@lakshgupta
Copy link

Description

The else condition gets skipped in case it's written after a newline.

Expected behavior

Either the code executes the else condition or fails with an error.

Current behavior

The else condition does not get executed.

Additional information

Here is a small program to reproduce the issue:

fn main() {
    let a:bool = false
    if a == true {
        outln("True")
    }
    else {
        outln("False")
    }
}
@lakshgupta lakshgupta added the bug Something isn't working label Jun 24, 2024
@mertcandav mertcandav added the compiler Related with compiler/compile-time label Jun 24, 2024
@mertcandav
Copy link
Member

This issue is fixed with commit f4b18b0, thanks for your contribution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working compiler Related with compiler/compile-time
Projects
None yet
Development

No branches or pull requests

2 participants