Skip to content

Commit

Permalink
chore: Modify the error message of UniqueKeyError (#1570)
Browse files Browse the repository at this point in the history
* chore: Modify the error message of UniqueKeyError

Signed-off-by: he1pa <[email protected]>

* fix ut

Signed-off-by: he1pa <[email protected]>

---------

Signed-off-by: he1pa <[email protected]>
  • Loading branch information
He1pa committed Aug 14, 2024
1 parent de1060e commit d0fade6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion kclvm/sema/src/resolver/global.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ impl<'ctx> Resolver<'ctx> {
&[Message {
range: stmt.get_span_pos(),
style: Style::LineAndColumn,
message: format!("unique key error name '{}'", name),
message: format!("Unique key error name '{}'", name),
note: None,
suggested_replacement: None,
}],
Expand Down
2 changes: 1 addition & 1 deletion test/grammar/schema/same_name_fail/stderr.golden
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ error[E2L28]: UniqueKeyError
--> ${CWD}/main.k:5:1
|
5 | schema Person:
| ^ unique key error name 'Person'
| ^ Unique key error name 'Person'
|
error[E2L28]: UniqueKeyError
--> ${CWD}/main.k:5:8
Expand Down

0 comments on commit d0fade6

Please sign in to comment.