builder error trying to assign tuple through if in compile-time code #18566
Labels
Bug
This tag is applied to issues which reports bugs.
Status: Confirmed
This bug has been confirmed to be valid by a contributor.
Describe the bug
Getting "This is a compiler bug, please report it" from the following code:
Expected Behavior
It should work the same way it does when not compile time.
Current Behavior
Reproduction Steps
v run iffy.v
Possible Solution
No response
Additional Information/Context
split_once() default behavior of returning 2 empty strings if the separator doesn't exist isn't useful behavior to me here, so I'm using the if to override the behavior. When reducing the code to a minimal reproducable example, the error went away when I eliminated the compile-time loop.
V version
V 0.3.4 dd24e8a
Environment details (OS name and version, etc.)
The text was updated successfully, but these errors were encountered: