-
Notifications
You must be signed in to change notification settings - Fork 167
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support string repeat with non constant integer #2675
Support string repeat with non constant integer #2675
Conversation
@Shaikh-Ubaid the following, unrelated to the changes in the PR, fails: my_string: str = "#"
repeated_string: str = my_string * -1
print(repeated_string) (base) saurabh-kumar@Awadh:~/Projects/System/lpython$ ./src/bin/lpython ./examples/example.py
malloc(): corrupted top size
Aborted (core dumped) An assert statement had checked for this case before, but interestingly the assertion did not fail. The error is observed when we try to use the obtained value, either by trying to print it, or store it. |
@Shaikh-Ubaid after you approve these changes, I will make the changes stated in https://github.com/lcompilers/lpython/pull/2651/files#r1573132771 |
36cd4a9
to
25b4c0e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Thanks for this!
fixes #2652