-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
comptime if does not work as expected #25123
Copy link
Copy link
Closed
Labels
BugThis tag is applied to issues which reports bugs.This tag is applied to issues which reports bugs.ComptimeFeatures processed during compile time, like $if, $for, $env etcFeatures processed during compile time, like $if, $for, $env etcUnit: cgenBugs/feature requests, that are related to the default C generating backend.Bugs/feature requests, that are related to the default C generating backend.
Description
Metadata
Metadata
Assignees
Labels
BugThis tag is applied to issues which reports bugs.This tag is applied to issues which reports bugs.ComptimeFeatures processed during compile time, like $if, $for, $env etcFeatures processed during compile time, like $if, $for, $env etcUnit: cgenBugs/feature requests, that are related to the default C generating backend.Bugs/feature requests, that are related to the default C generating backend.
Type
Fields
Give feedbackNo fields configured for Bug.
Describe the bug
It seems
cgenhas some bug when generate code for some comptime$if.Reproduction Steps
some code extract from
vlib/v/tests/comptime/comptime_if_expr_test.vversion.v
Expected Behavior
output
Current Behavior
output
Possible Solution
No response
Additional Information/Context
No response
V version
V 0.4.11 460b48a.4f8a3da
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.