julelang / jule

Effective programming language to build efficient, fast, reliable and safe software while maintaining simplicity
https://jule.dev
BSD 3-Clause "New" or "Revised" License
128 stars 13 forks source link

`Else` condition after a newline gets skipped #108

Closed lakshgupta closed 2 months ago

lakshgupta commented 2 months ago

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")
    }
}
mertcandav commented 2 months ago

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