Skip to content

Commit

Permalink
Add warning not to use Entries
Browse files Browse the repository at this point in the history
  • Loading branch information
turbolent committed May 22, 2020
1 parent 3e6b8a4 commit e53eec1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions runtime/interpreter/value.go
Original file line number Diff line number Diff line change
Expand Up @@ -5326,6 +5326,7 @@ func (v *DictionaryValue) Count() int {
func (v *DictionaryValue) Remove(inter *Interpreter, locationRange LocationRange, keyValue Value) OptionalValue {
v.modified = true

// Don't use `Entries` here: the value might be deferred and needs to be loaded
value := v.Get(inter, locationRange, keyValue)

key := dictionaryKey(keyValue)
Expand Down

0 comments on commit e53eec1

Please sign in to comment.