mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-24 17:52:41 +00:00
Fix type of a choice value to be the choice type, not the type-of-choice type. (#1276)
This commit is contained in:
1 parent
b36c006a01
commit
30642927b0
2 files changed
+10
-12
No files matched your search
+3
-3
@@ -18,9 +18,9 @@ choice Ints {
|
||||
}
|
||||
|
||||
fn Main() -> i32 {
|
||||
var x: auto = Ints.None();
|
||||
var y: auto = Ints.One(42);
|
||||
var n: auto = 0;
|
||||
var x: Ints = Ints.None();
|
||||
var y: Ints = Ints.One(42);
|
||||
var n: i32 = 0;
|
||||
match (y) {
|
||||
case Ints.None =>
|
||||
n = n + 2;
|
||||
|
||||
Reference in new issue
Block a user