kitlang / kit

Kit: a magical, high performance programming language, designed for game development.
https://www.kitlang.org
Other
1.02k stars 29 forks source link

Temp variable ordering issue for match expressions #105

Closed bendmorris closed 5 years ago

bendmorris commented 5 years ago

If this is a code issue, provide a minimal code example:

struct MyStruct {
    public var x: Int;
    public var y: Float;
}

function main() {
    var a = Some(struct MyStruct {x: 1, y: 2});
    match a {
        Some(x) => match if x.x == 1 then true else false {
            true => puts("1");
            default => puts("something else");
        }
    }
}