File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -2557,8 +2557,8 @@ extension _NativeDictionaryBuffer where Key: Hashable
2557
2557
@_versioned // FIXME(sil-serialize-all)
2558
2558
internal func unsafeAddNew( key newKey: Key , value: Value ) {
2559
2559
let ( i, found) = _find ( newKey, startBucket: _bucket ( newKey) )
2560
- _sanityCheck (
2561
- !found, " unsafeAddNew was called, but the key is already present " )
2560
+ _precondition (
2561
+ !found, " Duplicate key found in Dictionary. Keys may have been mutated after insertion " )
2562
2562
initializeKey ( newKey, value: value, at: i. offset)
2563
2563
}
2564
2564
Original file line number Diff line number Diff line change @@ -2161,8 +2161,8 @@ extension _NativeSetBuffer where Element: Hashable
2161
2161
@_versioned // FIXME(sil-serialize-all)
2162
2162
internal func unsafeAddNew( key newKey: Element ) {
2163
2163
let ( i, found) = _find ( newKey, startBucket: _bucket ( newKey) )
2164
- _sanityCheck (
2165
- !found, " unsafeAddNew was called, but the key is already present " )
2164
+ _precondition (
2165
+ !found, " Duplicate element found in Set. Elements may have been mutated after insertion " )
2166
2166
initializeKey ( newKey, at: i. offset)
2167
2167
}
2168
2168
You can’t perform that action at this time.
0 commit comments