Fix type of a choice value to be the choice type, not the type-of-choice type. (#1276)

This commit is contained in:
Richard Smith
2022-05-18 16:27:58 -07:00
committed by GitHub
parent b36c006a01
commit 30642927b0
2 changed files with 10 additions and 12 deletions
+3 -3
View File
@@ -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;