This commit is contained in:
Jarred Sumner
2021-06-06 21:16:50 -07:00
parent 5d208f9ea0
commit b97aca7fa1
2 changed files with 3 additions and 3 deletions

View File

@@ -3482,7 +3482,7 @@ pub const Ast = struct {
top_level_symbol_to_parts: AutoHashMap(Ref, std.ArrayList(u32)) = undefined,
export_star_import_records: []u32 = &([_]u32{}),
pub const NamedImports = std.ArrayHashMap(Ref, NamedImport, Ref.hash, Ref.eql, true);
pub const NamedImports = std.ArrayHashMap(Ref, NamedImport, RefHashCtx, true);
pub const NamedExports = StringHashMap(NamedExport);
pub fn initTest(parts: []Part) Ast {

View File

@@ -159,9 +159,9 @@ fn JSONLikeParser(opts: js_lexer.JSONOptions) type {
}
var str = p.lexer.toEString();
const is_duplicate = duplicates.exists(p.lexer.string_literal_slice);
const is_duplicate = duplicates.contains(p.lexer.string_literal_slice);
if (!is_duplicate) {
duplicates.put(p.lexer.string_literal_slice) catch unreachable;
duplicates.insert(p.lexer.string_literal_slice) catch unreachable;
}
var key_range = p.lexer.range();
// Warn about duplicate keys