|
|
|
|
|
by vidarh
844 days ago
|
|
a = b - c
if a != 0 then x = y / a
Here you can infer that the type of 'a' inside the 'then' is a NonZeroNumber. "All" you need is for the type checker to be able to recognize when a conditional acts as a guard against a subset of the possible types. |
|