Hotfix for if with no else
Was adding extra tests and noticed an egregious bug, so - hotfix!
the issue was as follows:
fn something() {
var x = 0;
if (someVar > 2) { x = 4;}
return x;
}
That would always return null, but these variations worked fine:
fn something() {
var x = 0;
if (someVar > 2) { x = 4;};
return x;
}
fn something() {
var x = 0;
if (someVar > 2) { x = 4;} else {}
return x;
}
It turned out there was a parse bug that would "eat" the rest of the function after an if block until it hit an else or a ";".
Bug is now fixed so you can write functions ergonomically without worrying about it anymore!