Bug ? in Dictionary>>keyAtIdentityValue:
Stéphane Rollandin
lecteur at zogotounga.net
Thu May 27 19:43:29 UTC 2004
When trying to update Monticello in a 3.7b image (update 5923), I got a
wallback and eventually found that this method in Dictionary:
----------
keyAtIdentityValue: value
"Answer the key that is the external name for the argument, value. If
there is none, answer nil.
Note: There can be multiple keys with the same value. Only one is
returned."
^self keyAtIdentityValue: value ifAbsent: [self errorValueNotFound]
----------
... was raising an error. looking at its comment I replaced it with:
----------
keyAtIdentityValue: value
"Answer the key that is the external name for the argument, value. If
there is none, answer nil.
Note: There can be multiple keys with the same value. Only one is
returned."
^self keyAtIdentityValue: value ifAbsent: [nil]
----------
... then everything seemed to work ok.
so was this a bug ? it seems that Dictionary>>keyAtValue: is also not
consistent with its comment.
Stef
More information about the Squeak-dev
mailing list
|