We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
module main // import scanner struct Test[T] {} fn (t Test[T]) abc[U]() { t.xyz[U]() // using t.xyz[T, U]() works } fn (t Test[T]) xyz[U]() {} fn main() { t := Test[string]{} t.abc[f32]() t.abc[u32]() }
Try to compile the above code
Compile successfully
src/main.v:8:7: error: expected 2 generic parameters, got 1 6 | 7 | fn (t Test[T]) abc[U]() { 8 | t.xyz[U]() // using t.xyz[T, U]() works | ~~~ 9 | } 10 | src/main.v:8:4: error: could not infer generic type `U` in call to `xyz` 6 | 7 | fn (t Test[T]) abc[U]() { 8 | t.xyz[U]() // using t.xyz[T, U]() works | ~~~~~~~~ 9 | } 10 |
No response
V 0.4.3 cb28144
V full version: V 0.4.3 b347f54.cb28144 OS: linux, Linux version 6.6.8-200.fc39.x86_64 (mockbuild@f2936e05dca94a129acf79933fec484d) (gcc (GCC) 13.2.1 20231205 (Red Hat 13.2.1-6), GNU ld version 2.40-13.fc39) #1 SMP PREEMPT_DYNAMIC Thu Dec 21 04:01:49 UTC 2023 Processor: 4 cpus, 64bit, little endian, Intel(R) Core(TM) i5-4310U CPU @ 2.00GHz getwd: /home/user/Projects/v-testing/mineflayer vexe: /home/user/.local/lib/v/v vexe mtime: 2024-01-01 12:28:31 vroot: OK, value: /home/user/.local/lib/v VMODULES: OK, value: /home/user/.vmodules VTMP: OK, value: /tmp/v_1002 Git version: git version 2.43.0 Git vroot status: weekly.2023.50-133-gcb28144e .git/config present: true CC version: cc (GCC) 13.2.1 20231205 (Red Hat 13.2.1-6) 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:
checker: fix generic method calls with multi generic types(fix vlang#…
6dd70d3
…20330)
checker: fix generic method calls with multi generic types (fix #20330)…
00a2356
… (#20360)
shove70
Successfully merging a pull request may close this issue.
Describe the bug
Reproduction Steps
Try to compile the above code
Expected Behavior
Compile successfully
Current Behavior
Possible Solution
No response
Additional Information/Context
No response
V version
V 0.4.3 cb28144
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: