No backwards compatibility for string concatinations #2189
-
I was wondering if it was intended that this would give an error: [User] error: Expression [1]:2:5: failed to legalize operation 'pop.string.concat' that was explicitly marked illegal When doing
it does work. However, in python we don't have to declare something to be mutable to be able to change it. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
It shouldn't be an issue with mutability. Firstly, mojo got rid of The code you have works fine in a script. def main():
z = "h"
z = z + "ello"
print(z) |
Beta Was this translation helpful? Give feedback.
-
Hi @alfie-nsugh this is a known issue with string literals in the REPL. We have an issue, and are working on fixing it. |
Beta Was this translation helpful? Give feedback.
Hi @alfie-nsugh this is a known issue with string literals in the REPL. We have an issue, and are working on fixing it.