Option types in match result in 3 compiler errors. #21077
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.
Unit: Parser
Bugs/feature requests, that are related to the V parser or syntax (*not* semantic ones).
Describe the bug
Related to #21076. If a sum type has an Option type as one of its types and match over the sum type with the option type as part of the match, then the compiler returns 3 errors about the option type.
Reproduction Steps
vfmt off
andvfmt on
is to get around #21076Expected Behavior
To compile normally
Current Behavior
Returns 3 errors
Possible Solution
No response
Additional Information/Context
No response
V version
V 9d4ec7b
Environment details (OS name and version, etc.)
OS: linux, "Arch Linux"
Processor: 12 cpus, 64bit, little endian, AMD Ryzen 5 3600X 6-Core Processor
vroot: OK
VMODULES: OK
VTMP: OK
Git version: git version 2.44.0
Git vroot status: weekly.2023.45.1-870-g9d4ec7b5
.git/config present: true
CC version: cc (GCC) 13.2.1 20230801
thirdparty/tcc status: thirdparty-linux-amd64 12f392c3
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: