Should types of match and if expression arms match? #412
Replies: 3 comments
-
See mamba/src/check/constrain/mod.rs Line 64 in 63cc218 mamba/src/check/constrain/mod.rs Line 65 in 63cc218 |
Beta Was this translation helpful? Give feedback.
-
And mamba/tests/system/valid/control_flow.rs Line 58 in 63cc218 Which also refers to source:
|
Beta Was this translation helpful? Give feedback.
-
I'd say that they shouldn't match perse, as we have a union system which is built to deal with such cases. Might get a bit complicated, not sure, since we might start to have circular dependencies here. Until we properly implement such a system, this issue must remain open. |
Beta Was this translation helpful? Give feedback.
-
We can either:
This falls more in line with the language philosophy I think of being strict while also allowing a certain level of flexibility more familiar to Python users.
Beta Was this translation helpful? Give feedback.
All reactions