Skip to content

Commit

Permalink
Re-enable validation of getter/setter names (#1892)
Browse files Browse the repository at this point in the history
Accidentally left out of #1882
  • Loading branch information
alexcrichton authored Dec 3, 2019
2 parents 8be8e09 + 9a17644 commit 31f7bd5
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions crates/cli-support/src/js/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use std::collections::{BTreeMap, BTreeSet, HashMap, HashSet};
use std::fmt;
use std::fs;
use std::path::{Path, PathBuf};
use walrus::{ExportId, FunctionId, ImportId, MemoryId, Module, TableId};
use walrus::{FunctionId, ImportId, MemoryId, Module, TableId};

mod binding;

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

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

for e in self.aux.enums.iter() {
self.generate_enum(e)?;
Expand Down Expand Up @@ -2970,7 +2970,7 @@ impl<'a> Context<'a> {
}

fn check_duplicated_getter_and_setter_names(
exports: &[(&ExportId, &AuxExport)],
exports: &[(&AdapterId, &AuxExport)],
) -> Result<(), Error> {
let verify_exports =
|first_class, first_field, second_class, second_field| -> Result<(), Error> {
Expand Down

0 comments on commit 31f7bd5

Please sign in to comment.