Skip to content

Commit 399dbaf

Browse files
authored
Fix to use updated syntax in error message (#7841)
1 parent 1ada4d7 commit 399dbaf

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

rust/kcl-lib/src/execution/fn_call.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -744,7 +744,7 @@ fn assign_args_to_params_kw(
744744
return Err(if args.kw_args.labeled.contains_key(param_name) {
745745
KclError::new_argument(KclErrorDetails::new(
746746
format!(
747-
"The function does declare a parameter named '{param_name}', but this parameter doesn't use a label. Try removing the `{param_name}:`"
747+
"The function does declare a parameter named '{param_name}', but this parameter doesn't use a label. Try removing the `{param_name} =`"
748748
),
749749
source_ranges,
750750
))

rust/kcl-lib/tests/kw_fn_unlabeled_but_has_label/execution_error.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: Error from executing kw_fn_unlabeled_but_has_label.kcl
55
KCL Argument error
66

77
× argument: The function does declare a parameter named 'x', but this
8-
│ parameter doesn't use a label. Try removing the `x:`
8+
│ parameter doesn't use a label. Try removing the `x =`
99
╭─[1:12]
1010
1 │ ╭─▶ fn add(@x) {
1111
2 │ │ return x + 1
@@ -19,7 +19,7 @@ KCL Argument error
1919
╰─▶ KCL Argument error
2020

2121
× argument: The function does declare a parameter named 'x', but this
22-
parameter doesn't use a label. Try removing the `x:`
22+
parameter doesn't use a label. Try removing the `x =`
2323
╭─[1:12]
2424
1 │ ╭─▶ fn add(@x) {
2525
2 │ │ return x + 1

0 commit comments

Comments
 (0)