Replies: 1 comment 1 reply
-
No. V is statically typed. Once the type of a variable is set, you cannot change the type. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have this issue where I need my variable either to be an interger or an string.
'''
condition = true
mut var
if condition{var = "pop"}
else{var = 1}
'''
Is there a way to do that?
Beta Was this translation helpful? Give feedback.
All reactions