Fix match bug when no case matches (#677)

This commit is contained in:
Geoff Romer
2021-07-27 11:14:10 -07:00
committed by GitHub
parent 165651c75c
commit fb0c0b63bf
4 changed files with 15 additions and 1 deletions
+12
View File
@@ -0,0 +1,12 @@
// Part of the Carbon Language project, under the Apache License v2.0 with LLVM
// Exceptions. See /LICENSE for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
fn main() -> Int {
var x: Int = 0;
match (x) {
case 1 =>
return 1;
}
return 0;
}
+1
View File
@@ -0,0 +1 @@
result: 0