mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 13:01:04 +01:00
Fix type of a choice value to be the choice type, not the type-of-choice type. (#1276)
This commit is contained in:
+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