C Error: Generic Result/Option Function Return Fixed Array #20465
Labels
Bug
This tag is applied to issues which reports bugs.
Generics[T]
Bugs/feature requests, that are related to the V generics.
Option Type
Bugs/feature requests, that are related to `?Type`.
Unit: cgen
Bugs/feature requests, that are related to the default C generating backend.
Describe the bug
Calling a generic function T that returns T in an Option or Result with T being a fixed array will cause this error to happen.
Reproduction Steps
Expected Behavior
The array T to be returned.
Current Behavior
It created a C error as follows:
Possible Solution
It appears the issue lies in the automatically generated function name.
Additional Information/Context
The element type and size of T don't matter.
This bug has been found and only been tested on V Playground.
V version
V 0.4.4 28e810d
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.
The text was updated successfully, but these errors were encountered: