#zig build-obj {
--name test -fno-emit-bin
-Mroot=test.zig
#}

#write test.zig {
comptime {
    const a = "foo";
    if (a != "foo") unreachable;
}
comptime {
    const a = "foo";
    if (a == "foo") {} else unreachable;
}
comptime {
    const a = "foo";
    if (a != ("foo")) {} // intentionally allow
    if (a == ("foo")) {} // intentionally allow
}
comptime {
    const a = "foo";
    switch (a) {
        "foo" => {},
        else => unreachable,
    }
}
comptime {
    const a = "foo";
    switch (a) {
        ("foo") => {}, // intentionally allow
        else => {},
    }
}
#}
#update
#check errors {
test.zig:3:11: error: cannot compare strings with !=
test.zig:7:11: error: cannot compare strings with ==
test.zig:17:9: error: cannot switch on strings
#}
