Skip to content

Commit

Permalink
Re-enable validation of getter/setter names
Browse files Browse the repository at this point in the history
Accidentally left out of rustwasm#1882
  • Loading branch information
alexcrichton committed Dec 3, 2019
1 parent 8e56cda commit 9a17644
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 @@ -2975,7 +2975,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 9a17644

Please sign in to comment.