Skip to content

Commit

Permalink
Sema: simplify "duplicate test name" error message
Browse files Browse the repository at this point in the history
 * Avoid redundant words ("found")
   - All compile errors are found by the compiler
 * Avoid unnecessary prepositions ("with")
   - There is a grammatically correct alternate word order without the
     preposition.
  • Loading branch information
andrewrk committed May 19, 2023
1 parent b9d2e0e commit 503302c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Module.zig
Original file line number Diff line number Diff line change
Expand Up @@ -5354,7 +5354,7 @@ fn scanDecl(iter: *ScanDeclIter, decl_sub_index: usize, flags: u4) Allocator.Err
const msg = try ErrorMsg.create(
gpa,
src_loc,
"found test declaration with duplicate name: {s}",
"duplicate test name: {s}",
.{decl_name},
);
errdefer msg.destroy(gpa);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ test "thingy" {}
// target=native
// is_test=1
//
// :1:6: error: found test declaration with duplicate name: test.thingy
// :1:6: error: duplicate test name: test.thingy
// :2:6: note: other test here

0 comments on commit 503302c

Please sign in to comment.