Two Result functions not unwrapped in ladder if / else if / else
#22784
Labels
Bug
This tag is applied to issues which reports bugs.
Unit: cgen
Bugs/feature requests, that are related to the default C generating backend.
Describe the bug
Code: https://play.vlang.io/p/6d4906bdaa
Reproduction Steps
In the above code (playground) inside the final case
else
the variableerr
cannot be found and a C error is produced.If we cancel one of the three cases leaving only two levels
if / else
, theerr
is unwrapped correctly:Expected Behavior
Unwrap the error all the way down the ladder
if / else if / else
or notify it can't be done.Current Behavior
Output:
Possible Solution
No response
Additional Information/Context
No response
V version
V 0.4.8 107167a
Environment details (OS name and version, etc.)
Note
You can use the 👍 reaction to increase the issue's priority for developers.
Please note that only the 👍 reaction to the issue itself counts as a vote.
Other reactions and those to comments will not be taken into account.
Huly®: V_0.6-21230
The text was updated successfully, but these errors were encountered: