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

[Feature Request] is_compile_time should return Bool #4124

Open
1 task done
soraros opened this issue Mar 8, 2025 · 0 comments
Open
1 task done

[Feature Request] is_compile_time should return Bool #4124

soraros opened this issue Mar 8, 2025 · 0 comments
Labels
enhancement New feature or request mojo Issues that are related to mojo

Comments

@soraros
Copy link
Contributor

soraros commented Mar 8, 2025

Review Mojo's priorities

What is your request?

As title. CC @JoeLoser.

What is your motivation for this change?

Now it returns a i1, so we can't write code like if not is_compile_time(): .... Maybe we should wrap it in a function.

alias is_compile_time = __mlir_op.`kgen.is_compile_time`
"""Returns true if the current code is executed at compile time, false
otherwise.
"""

Any other details?

N/A

@soraros soraros added enhancement New feature or request mojo Issues that are related to mojo labels Mar 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request mojo Issues that are related to mojo
Projects
None yet
Development

No branches or pull requests

1 participant