diff --git a/vlib/v/checker/check_types.v b/vlib/v/checker/check_types.v index ecd9d0b281..7ee1dd4e7a 100644 --- a/vlib/v/checker/check_types.v +++ b/vlib/v/checker/check_types.v @@ -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) } } diff --git a/vlib/v/checker/tests/generics_type_ambigous.out b/vlib/v/checker/tests/generics_type_ambigous.out deleted file mode 100644 index c5ffb9a8b1..0000000000 --- a/vlib/v/checker/tests/generics_type_ambigous.out +++ /dev/null @@ -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 | } diff --git a/vlib/v/checker/tests/generics_type_ambiguous.out b/vlib/v/checker/tests/generics_type_ambiguous.out new file mode 100644 index 0000000000..affad87bbe --- /dev/null +++ b/vlib/v/checker/tests/generics_type_ambiguous.out @@ -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 | } diff --git a/vlib/v/checker/tests/generics_type_ambigous.vv b/vlib/v/checker/tests/generics_type_ambiguous.vv similarity index 100% rename from vlib/v/checker/tests/generics_type_ambigous.vv rename to vlib/v/checker/tests/generics_type_ambiguous.vv