Anonymous | Login | 01-15-2021 18:26 UTC |
Main | My View | View Issues | Change Log | Docs |
Viewing Issue Simple Details [ Jump to Notes ] | [ View Advanced ] [ Issue History ] [ Print ] | ||||||||
ID | Category | Severity | Reproducibility | Date Submitted | Last Update | ||||
0007258 | [Squeak] Collections | minor | always | 12-30-08 22:50 | 04-18-10 22:04 | ||||
Reporter | nicolas cellier | View Status | public | ||||||
Assigned To | nicolas cellier | ||||||||
Priority | normal | Resolution | fixed | ||||||
Status | closed | Product Version | 3.10 | ||||||
Summary | 0007258: Dictionary asSet is wrong | ||||||||
Description |
Following http://lists.squeakfoundation.org/pipermail/squeak-dev/2007-June/117894.html [^] that recently came up through http://lists.gforge.inria.fr/pipermail/pharo-project/2008-December/004305.html [^] I have prepared a little test: | aDictionary aSet | aDictionary := Dictionary new. aSet := aDictionary asSet. assoc0 := #first -> 0. assoc1 := #first -> 1. aSet add: assoc0; add: assoc1. self assert: (assoc0 ~= assoc1) ==> (aSet size > 1) description: ' When adding two different elements, the set size should be greater than one' |
||||||||
Additional Information |
Guess what is (aSet class) ? No, a Dictionary is not a Set of associations, at least since Assocation>>#= has been changed to also test the value. It used to be a Set of Associations in st80 when only the association key was compared... |
||||||||
Attached Files |
![]() ![]() |
||||||||
|
![]() |
|
(0012885 - 530 - 778 - 778 - 778 - 778 - 778) nicolas cellier 12-30-08 22:57 edited on: 12-30-08 23:34 |
"Hem, I posted my test too fast... it results in assoc0 = assoc1, because #add: will modify assoc0 in place... though aSet size = 1, the assertion did not fail..." | aDictionary aSet assoc0 assoc1 | aDictionary := Dictionary new. aSet := aDictionary asSet. assoc0 := #first -> 0. assoc1 := #first -> 1. aSet add: assoc0 copy; add: assoc1. self assert: (assoc0 copy ~= assoc1) ==> (aSet size > 1) description: ' When adding two different elements, the set size should be greater than one' |
(0013359 - 181 - 235 - 235 - 235 - 235 - 235) nicolas cellier 10-06-09 12:26 |
"fix begin" Installer mantis bug: 7258 fix:'M7258-Dictionary-asSet-Patch-nice.1.cs'. "fix test" Installer mantis bug: 7258 fix:'M7258-Dictionary-asSet-Test-nice.1.cs'. "fix end" |
(0013360 - 130 - 136 - 466 - 466 - 466 - 466) nicolas cellier 10-06-09 12:31 |
Fixed in http://source.squeak.org/trunk/Collections-nice.162.mcz [^] and http://source.squeak.org/trunk/CollectionsTests-nice.102.mcz [^] |
Mantis 1.0.8[^]
Copyright © 2000 - 2007 Mantis Group
57 total queries executed. 35 unique queries executed. |