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)
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"); } }