Skip to content

Commit 5ba6f41

Browse files
committed
add expected got
1 parent 2af9d09 commit 5ba6f41

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

third_party/move/move-compiler-v2/tests/checking/typing/v1-naming/vector_literal_type_arity.exp

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11

22
Diagnostics:
3-
error: wrong number of type arguments
3+
error: wrong number of type arguments (expected 1, got 0)
44
┌─ tests/checking/typing/v1-naming/vector_literal_type_arity.move:4:18
55
66
4 │ let v0 = vector<>[];
77
│ ^^^^^^
88

9-
error: wrong number of type arguments
9+
error: wrong number of type arguments (expected 1, got 2)
1010
┌─ tests/checking/typing/v1-naming/vector_literal_type_arity.move:5:18
1111
1212
5 │ let v2 = vector<u64, bool>[0, false];

third_party/move/move-model/src/builder/exp_builder.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1153,7 +1153,7 @@ impl<'env, 'translator, 'module_translator> ExpTranslator<'env, 'translator, 'mo
11531153
let loc = self.to_loc(loc);
11541154
let elem_ty = if let Some(tys) = ty_opt {
11551155
if tys.len() != 1 {
1156-
self.error(&loc, "wrong number of type arguments");
1156+
self.error(&loc, &format!("wrong number of type arguments (expected 1, got {})", tys.len()));
11571157
Type::Error
11581158
} else {
11591159
self.translate_type(&tys[0])

0 commit comments

Comments
 (0)