Skip to content
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

[BUG]: failed to legalize operation 'pop.string.concat' that was explicitly marked illegal #425

Closed
mzaks opened this issue Jul 4, 2023 · 1 comment
Labels
bug Something isn't working mojo-repo Tag all issues with this label

Comments

@mzaks
Copy link
Contributor

mzaks commented Jul 4, 2023

Bug description

Following usage of the __add__ function on StringLiteral does not work:

fn _print(indentation: StringLiteral):
    print(indentation)
    if len(indentation) < 10:
        _print(indentation + " ")

_print("a")

What is curious, if the _print function is defined without usage, the compiler does not complain.

@mzaks mzaks added the bug Something isn't working label Jul 4, 2023
@Mogball
Copy link
Collaborator

Mogball commented Jul 6, 2023

Thanks for filing this issue! This is a known problem and is a current limitation being addressed. In the meantime, please use a String. Closing in favour of #100

@Mogball Mogball closed this as completed Jul 6, 2023
@ematejska ematejska added the mojo-repo Tag all issues with this label label May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working mojo-repo Tag all issues with this label
Projects
None yet
Development

No branches or pull requests

3 participants