Fix typos

This commit is contained in:
imaqtkatt 2024-01-25 09:16:58 -03:00
parent 898440d025
commit b75aaead7e
3 changed files with 4 additions and 4 deletions

View File

@ -13,7 +13,7 @@ pub trait BuiltinAdt {
/// Returns true if the built-in adt was used. /// Returns true if the built-in adt was used.
fn encode_terms(&self, book: &mut Book) -> bool; fn encode_terms(&self, book: &mut Book) -> bool;
/// Checks if the adt name or any constructor name was overriden by the user. /// Checks if the adt name or any constructor name was overridden by the user.
fn check(&self, book: &Book) -> Result<(), String> { fn check(&self, book: &Book) -> Result<(), String> {
let adt_name = self.name(); let adt_name = self.name();
if book.adts.contains_key(&adt_name) { if book.adts.contains_key(&adt_name) {
@ -21,7 +21,7 @@ pub trait BuiltinAdt {
} }
for (ctr, ..) in self.constructors() { for (ctr, ..) in self.constructors() {
if book.ctrs.contains_key(&ctr) { if book.ctrs.contains_key(&ctr) {
return Err(format!("{ctr} is a built-in constructor and should not be overriden.")); return Err(format!("{ctr} is a built-in constructor and should not be overridden."));
} }
} }
Ok(()) Ok(())

View File

@ -2,4 +2,4 @@
source: tests/golden_tests.rs source: tests/golden_tests.rs
input_file: tests/golden_tests/run_file/override_list_ctr.hvm input_file: tests/golden_tests/run_file/override_list_ctr.hvm
--- ---
LNil is a built-in constructor and should not be overriden. LNil is a built-in constructor and should not be overridden.

View File

@ -2,4 +2,4 @@
source: tests/golden_tests.rs source: tests/golden_tests.rs
input_file: tests/golden_tests/run_file/override_str_ctr.hvm input_file: tests/golden_tests/run_file/override_str_ctr.hvm
--- ---
SCons is a built-in constructor and should not be overriden. SCons is a built-in constructor and should not be overridden.