Figure out empty array []
argument for generic function
#22843
Labels
Bug
This tag is applied to issues which reports bugs.
[]
argument for generic function
#22843
Describe the bug
Using empty array
[]
as argument of functions of type defined works. Do the same for generic functions.Reproduction Steps
Expected Behavior
In the code above figure out the argument of last line:
count[f64]([])
instead requiring to write the larger formcount[f64]([]f64{})
.Current Behavior
code.v:21:19: error: cannot use
[]T
as[]f64
in argument 1 tocount
Possible Solution
No response
Additional Information/Context
No response
V version
V 0.4.8 fe5609d
Environment details (OS name and version, etc.)
https://play.vlang.io/p/3f23d7bdd1
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-21288
The text was updated successfully, but these errors were encountered: