mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-19 22:56:39 +00:00
Check exhaustiveness of function-ending match statements (#882)
Co-authored-by: Jon Meow <46229924+jonmeow@users.noreply.github.com>
This commit is contained in:
1 parent
652bee6d99
commit
c2140c6cb9
8 files changed
+62
No files matched your search
@@ -17,4 +17,5 @@ fn main() -> i32 {
|
||||
case (a: auto, b: auto) =>
|
||||
return a + b - 7;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
@@ -19,4 +19,5 @@ fn main() -> i32 {
|
||||
case ((a: auto, b: auto), c: auto) =>
|
||||
return a - b + c[0] - c[1] + 2;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
@@ -19,4 +19,5 @@ fn main() -> i32 {
|
||||
case (a: auto, .x = b: auto) =>
|
||||
return a - b + 3;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
Reference in new issue
Block a user