[Feature Request] Constrained[False], or alternative, should not cause a return expected error #2547
Labels
enhancement
New feature or request
mojo-repo
Tag all issues with this label
mojo-stdlib
Tag for issues related to standard library
Review Mojo's priorities
What is your request?
Example Code
The following code should NOT cause a "return expected at end of function with results" compilation error.
Along with this, there should really just be
unreachable
.What is your motivation for this change?
If Mojo is allowing compile time verification of inputs to a function, it makes sense that extra code to return an invalid value should not be required, as the code added can by nature never run.
Any other details?
No response
The text was updated successfully, but these errors were encountered: