Skip to content

Commit 676b8e7

Browse files
Azoylorentey
andauthored
Update stdlib/public/core/DictionaryBuilder.swift
Co-authored-by: Karoy Lorentey <[email protected]>
1 parent 551acb3 commit 676b8e7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

stdlib/public/core/DictionaryBuilder.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,10 @@ extension _NativeDictionary {
106106
// If the capacity is 0, then our storage is the empty singleton. Those are
107107
// read only, so we shouldn't attempt to write to them.
108108
if capacity == 0 {
109+
let c = initializer(
110+
UnsafeMutableBufferPointer(start: nil, count: 0),
111+
UnsafeMutableBufferPointer(start: nil, count: 0))
112+
_precondition(c == 0)
109113
return
110114
}
111115

0 commit comments

Comments
 (0)