Skip to content

Commit 5145e21

Browse files
committed
Eck, cache is mutable, eck
1 parent e65cf19 commit 5145e21

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/compiler/checker.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1056,8 +1056,7 @@ namespace ts {
10561056
* - the caller should always be checking if the cache `.has` the member it would set.
10571057
*/
10581058
set(key: K, value: V): this {
1059-
Debug.assert(!this.inner.has(key));
1060-
if (this.inner.size > ((2 ** 24) - 1)) {
1059+
if (!this.inner.has(key) && this.inner.size > ((2 ** 24) - 1)) {
10611060
this.next ||= new ExpandableRelationshipCache();
10621061
this.next.set(key, value);
10631062
}

0 commit comments

Comments
 (0)