Skip to content

Commit 31f7bd5

Browse files
authored
Re-enable validation of getter/setter names (#1892)
Accidentally left out of #1882
2 parents 8be8e09 + 9a17644 commit 31f7bd5

File tree

1 file changed

+5
-5
lines changed
  • crates/cli-support/src/js

1 file changed

+5
-5
lines changed

crates/cli-support/src/js/mod.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ use std::collections::{BTreeMap, BTreeSet, HashMap, HashSet};
1111
use std::fmt;
1212
use std::fs;
1313
use std::path::{Path, PathBuf};
14-
use walrus::{ExportId, FunctionId, ImportId, MemoryId, Module, TableId};
14+
use walrus::{FunctionId, ImportId, MemoryId, Module, TableId};
1515

1616
mod binding;
1717

@@ -1907,9 +1907,9 @@ impl<'a> Context<'a> {
19071907
self.generate_adapter(*id, adapter, instrs)?;
19081908
}
19091909

1910-
// let mut pairs = aux.export_map.iter().collect::<Vec<_>>();
1911-
// pairs.sort_by_key(|(k, _)| *k);
1912-
// check_duplicated_getter_and_setter_names(&pairs)?;
1910+
let mut pairs = self.aux.export_map.iter().collect::<Vec<_>>();
1911+
pairs.sort_by_key(|(k, _)| *k);
1912+
check_duplicated_getter_and_setter_names(&pairs)?;
19131913

19141914
for e in self.aux.enums.iter() {
19151915
self.generate_enum(e)?;
@@ -2970,7 +2970,7 @@ impl<'a> Context<'a> {
29702970
}
29712971

29722972
fn check_duplicated_getter_and_setter_names(
2973-
exports: &[(&ExportId, &AuxExport)],
2973+
exports: &[(&AdapterId, &AuxExport)],
29742974
) -> Result<(), Error> {
29752975
let verify_exports =
29762976
|first_class, first_field, second_class, second_field| -> Result<(), Error> {

0 commit comments

Comments
 (0)