AstGen: error on unused switch label
This commit is contained in:
@@ -22,6 +22,11 @@ comptime {
|
||||
comptime {
|
||||
blk: for (@as([0]void, undefined)) |_| {}
|
||||
}
|
||||
comptime {
|
||||
blk: switch (true) {
|
||||
else => {},
|
||||
}
|
||||
}
|
||||
|
||||
// error
|
||||
// target=native
|
||||
@@ -35,3 +40,4 @@ comptime {
|
||||
// :17:5: error: unused block label
|
||||
// :20:5: error: unused while loop label
|
||||
// :23:5: error: unused for loop label
|
||||
// :26:5: error: unused switch label
|
||||
|
||||
Reference in New Issue
Block a user