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

Kit is unable to statically execute a logical invert #143

Open bendmorris opened 4 years ago

bendmorris commented 4 years ago

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

function main() {
    static if defined(FLAG) {
        puts("this works");
    }
    static if !defined(FLAG) {
        puts("this doesn't");
    }
}
----------------------------------------
Error: ./test.kit:5: `static if` condition couldn't be evaluated at compile time

  @./test.kit:5:15-27
       5        static if !defined(FLAG) {
                          ^^^^^^^^^^^^^
[2019-11-25 13:25:31.4489] ERR: compilation failed (1 errors)