test: update cases to silence 'var is never mutated' errors
This commit is contained in:
@@ -1,20 +1,20 @@
|
||||
comptime {
|
||||
var a = "foo";
|
||||
const a = "foo";
|
||||
if (a == "foo") unreachable;
|
||||
}
|
||||
comptime {
|
||||
var a = "foo";
|
||||
const a = "foo";
|
||||
if (a == ("foo")) unreachable; // intentionally allow
|
||||
}
|
||||
comptime {
|
||||
var a = "foo";
|
||||
const a = "foo";
|
||||
switch (a) {
|
||||
"foo" => unreachable,
|
||||
else => {},
|
||||
}
|
||||
}
|
||||
comptime {
|
||||
var a = "foo";
|
||||
const a = "foo";
|
||||
switch (a) {
|
||||
("foo") => unreachable, // intentionally allow
|
||||
else => {},
|
||||
|
||||
Reference in New Issue
Block a user