You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
structAs {
}
typeAa=string|intfn (s As) b(aa ...Aa) int {
return0
}
fn (s As) a(s2&As, aa ...Aa) int {
a:= s2.b(aa)
return a
}
fnmain() {
s:= As{}
a:= []Aa{}
println(s.a(&s, ...a))
}
Expected Behavior
Should print 0.
Current Behavior
❯ v run test.v
test.v:11:10: error: to pass `aa` (Aa) to `b` (which accepts type `...Aa`), use `...aa`
9 |
10 | fn (s As) a(s2 &As, aa ...Aa) int {
11 | a := s2.b(aa)
| ~~~~~
12 | return a
13 | }
Describe the bug
Reported by @koplenov.
Made a smaller repro of his issue below.
Reproduction Steps
Expected Behavior
Should print 0.
Current Behavior
Possible Solution
No response
Additional Information/Context
No response
V version
V 0.4.12 8342968
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.