mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
checker: fix spelling in 'inferred generic type is ambiguous:' check (#9593)
This commit is contained in:
parent
98e1dd4b22
commit
ab77453f5f
@ -537,7 +537,7 @@ pub fn (mut c Checker) infer_fn_types(f ast.Fn, mut call_expr ast.CallExpr) {
|
||||
}
|
||||
}
|
||||
if !c.check_types(typ, to_set) {
|
||||
c.error('inferred generic type `$gt_name` is ambigous got `${c.table.get_type_symbol(to_set).name}`, expected `${c.table.get_type_symbol(typ).name}`',
|
||||
c.error('inferred generic type `$gt_name` is ambiguous: got `${c.table.get_type_symbol(to_set).name}`, expected `${c.table.get_type_symbol(typ).name}`',
|
||||
arg.pos)
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +0,0 @@
|
||||
vlib/v/checker/tests/generics_type_ambigous.vv:7:19: error: inferred generic type `B` is ambigous got `int`, expected `string`
|
||||
5 |
|
||||
6 | fn main() {
|
||||
7 | test(2, 2, "2", 2)
|
||||
| ^
|
||||
8 | }
|
6
vlib/v/checker/tests/generics_type_ambiguous.out
Normal file
6
vlib/v/checker/tests/generics_type_ambiguous.out
Normal file
@ -0,0 +1,6 @@
|
||||
vlib/v/checker/tests/generics_type_ambiguous.vv:7:19: error: inferred generic type `B` is ambiguous: got `int`, expected `string`
|
||||
5 |
|
||||
6 | fn main() {
|
||||
7 | test(2, 2, "2", 2)
|
||||
| ^
|
||||
8 | }
|
Loading…
Reference in New Issue
Block a user