Skip to content

Commit

Permalink
Fix typo, update tests snaps
Browse files Browse the repository at this point in the history
  • Loading branch information
LunaAmora committed Mar 7, 2024
1 parent 9215460 commit 6375099
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 20 deletions.
2 changes: 1 addition & 1 deletion src/diagnostics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ impl Display for WarningType {
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
match self {
WarningType::MatchOnlyVars => write!(f, "Match expression at definition only uses var patterns."),
WarningType::UnusedDefinition => write!(f, "Definition is unusued."),
WarningType::UnusedDefinition => write!(f, "Definition is unused."),
WarningType::RepeatedBind(warn) => write!(f, "{warn}"),
}
}
Expand Down
4 changes: 2 additions & 2 deletions tests/snapshots/compile_file__crlf.hvm.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
source: tests/golden_tests.rs
input_file: tests/golden_tests/compile_file/crlf.hvm
---
// WARNING:
// Warnings:
In definition 'a':
Definition is unusued.
Definition is unused.

@a = #1
@main = #2
24 changes: 12 additions & 12 deletions tests/snapshots/compile_file__match_num_all_patterns.hvm.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,29 @@
source: tests/golden_tests.rs
input_file: tests/golden_tests/compile_file/match_num_all_patterns.hvm
---
// WARNING:
// Warnings:
In definition 'succ_var':
Definition is unusued.
Definition is unused.
In definition 'succ_var_zero':
Definition is unusued.
Definition is unused.
In definition 'succ_zero':
Definition is unusued.
Definition is unused.
In definition 'succ_zero_succ':
Definition is unusued.
Definition is unused.
In definition 'succ_zero_var':
Definition is unusued.
Definition is unused.
In definition 'var_succ':
Definition is unusued.
Definition is unused.
In definition 'var_zero':
Definition is unusued.
Definition is unused.
In definition 'zero_succ':
Definition is unusued.
Definition is unused.
In definition 'zero_succ_var':
Definition is unusued.
Definition is unused.
In definition 'zero_var':
Definition is unusued.
Definition is unused.
In definition 'zero_var_succ':
Definition is unusued.
Definition is unused.

@main = #0
@succ_var = (?<(#0 (a a)) b> b)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
source: tests/golden_tests.rs
input_file: tests/golden_tests/compile_file/match_num_unscoped_lambda.hvm
---
// WARNING:
// Warnings:
In definition 'lambda_in':
Definition is unusued.
Definition is unused.
In definition 'lambda_out':
Definition is unusued.
Definition is unused.

@lambda_in = (?<((a a) (b (c b))) (c d)> d)
@lambda_out = (?<(a (b b)) c> (a c))
Expand Down
2 changes: 1 addition & 1 deletion tests/snapshots/compile_file__repeated_bind_match.hvm.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
source: tests/golden_tests.rs
input_file: tests/golden_tests/compile_file/repeated_bind_match.hvm
---
// WARNING:
// Warnings:
In definition 'main':
Repeated bind inside match arm: 'x'.

Expand Down
2 changes: 1 addition & 1 deletion tests/snapshots/compile_file__repeated_bind_rule.hvm.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
source: tests/golden_tests.rs
input_file: tests/golden_tests/compile_file/repeated_bind_rule.hvm
---
// WARNING:
// Warnings:
In definition 'Foo':
Repeated bind inside rule pattern: 'a'.

Expand Down

0 comments on commit 6375099

Please sign in to comment.