Unhandled Exception when setting const to function that returns error or struct #23555
Labels
C gen declarations order
Wrong order of declarations in CGEN.
Status: Confirmed
This bug has been confirmed to be valid by a contributor.
V version: V 0.4.9 4e68a86, press to see full `v doctor` output
What did you do?
./v -g -o vdbg cmd/v && ./vdbg C:\Users\imado\Documents\test.v && C:\Users\imado\Documents\test.exe
What did you see?
What did you expect to see?
Expected no "unhandled exception" and for "some_string\nSomething{}" to be printed.
Note
Moving
const something
to belowconst bar
lets the program compile and run fine.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.
The text was updated successfully, but these errors were encountered: