4 ms·
Flow typing is where the type of a variable changes based on control flow. Consider: x : Int32 | String if x.is_a? Int32 # typeof(x) == Int32
by RX14 8y ago
Flow typing is where the type of a variable changes based on control flow.
Consider:
x : Int32 | String
if x.is_a? Int32
# typeof(x) == Int32
else
# typeof(x) == String
end
- AnimalMuppet 8y agoThanks!