Commit e60be30824

antlilja <liljaanton2001@gmail.com>
2020-06-24 19:02:31
Remove unreachable else prongs
1 parent fd50696
Changed files (3)
lib
src-self-hosted
test
stage1
behavior
lib/std/zig/string_literal.zig
@@ -104,7 +104,6 @@ pub fn parse(
                     return error.InvalidCharacter;
                 },
             },
-            else => unreachable,
         }
     }
     unreachable;
src-self-hosted/translate_c.zig
@@ -2791,7 +2791,6 @@ fn transCharLiteral(
             "TODO: support character literal kind {}",
             .{kind},
         ),
-        else => unreachable,
     };
     if (suppress_as == .no_as) {
         return maybeSuppressResult(rp, scope, result_used, int_lit_node);
test/stage1/behavior/bugs/1111.zig
@@ -7,6 +7,5 @@ test "issue 1111 fixed" {
 
     switch (v) {
         Foo.Bar => return,
-        else => return,
     }
 }