struct Bar {
a: Cell?;
}
struct Baz {}
fun foo(x: Cell?): Bar {
let cond: Bool = true;
return Bar {
a: cond ? Baz {}.toCell() : x;
}
}
Produced error: Non-matching types "Cell" and "Cell?" for ternary branches
Expected behavior: should be allowed because Cell value can be assigned to Cell?. Baz {}.toCell() should be deduced to be the non-null value of type Cell?.
Produced error: Non-matching types "Cell" and "Cell?" for ternary branches Expected behavior: should be allowed because
Cell
value can be assigned toCell?
.Baz {}.toCell()
should be deduced to be the non-null value of typeCell?
.