From 1755a351b66dec05e0cb25b90d4a919a0482512b Mon Sep 17 00:00:00 2001 From: tbreisacher Date: Thu, 5 Apr 2018 10:45:48 -0700 Subject: [PATCH] Rename recordInvalidations to withInvalidationMap. The name recordInvalidations implies that the class should pass a non-empty map of invalidations which will be recorded. In fact, when this is called, the caller passes a mutable empty map, which the Builder later uses to record invalidations. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=191763716 --- src/com/google/javascript/jscomp/DisambiguateProperties.java | 2 +- src/com/google/javascript/jscomp/InvalidatingTypes.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/com/google/javascript/jscomp/DisambiguateProperties.java b/src/com/google/javascript/jscomp/DisambiguateProperties.java index 7ed1678c0bf..4f09001e19c 100644 --- a/src/com/google/javascript/jscomp/DisambiguateProperties.java +++ b/src/com/google/javascript/jscomp/DisambiguateProperties.java @@ -337,7 +337,7 @@ boolean scheduleRenaming(Node node, TypeI type) { this.invalidationMap = propertiesToErrorFor.isEmpty() ? null : LinkedHashMultimap.create(); this.invalidatingTypes = new InvalidatingTypes.Builder(registry) - .recordInvalidations(this.invalidationMap) + .writeInvalidationsInto(this.invalidationMap) .addTypesInvalidForPropertyRenaming() .addAllTypeMismatches(compiler.getTypeMismatches()) .addAllTypeMismatches(compiler.getImplicitInterfaceUses()) diff --git a/src/com/google/javascript/jscomp/InvalidatingTypes.java b/src/com/google/javascript/jscomp/InvalidatingTypes.java index 6b060b3f1c1..79f1c02d82e 100644 --- a/src/com/google/javascript/jscomp/InvalidatingTypes.java +++ b/src/com/google/javascript/jscomp/InvalidatingTypes.java @@ -91,7 +91,7 @@ InvalidatingTypes build() { // TODO(sdh): Investigate whether this can be consolidated between all three passes. // In particular, mutation testing suggests allowEnums=true should work everywhere. // We should revisit what breaks when we disallow scalars everywhere. - Builder recordInvalidations(@Nullable Multimap> invalidationMap) { + Builder writeInvalidationsInto(@Nullable Multimap> invalidationMap) { this.invalidationMap = invalidationMap; return this; }