<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Nov 28, 2014 at 4:26 PM, Sven Van Caekenberghe <span dir="ltr"><<a href="mailto:sven@stfx.eu" target="_blank">sven@stfx.eu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div class=""><div class="h5"><br>
> On 28 Nov 2014, at 15:35, Marcus Denker <<a href="mailto:marcus.denker@inria.fr">marcus.denker@inria.fr</a>> wrote:<br>
><br>
><br>
>> On 27 Nov 2014, at 08:21, Marcus Denker <<a href="mailto:marcus.denker@inria.fr">marcus.denker@inria.fr</a>> wrote:<br>
>><br>
>><br>
>>> On 26 Nov 2014, at 19:19, Eliot Miranda <<a href="mailto:eliot.miranda@gmail.com">eliot.miranda@gmail.com</a>> wrote:<br>
>>><br>
>>> Hi All,<br>
>>><br>
>>> IdentitySet>>collect: answers a Set, not an IdentitySet. Anyone else agree this is a serious bug? Anyone else disagree?<br>
>>><br>
>>> WTF??<br>
>>><br>
>>> (IdentitySet withAll: #(1 2 3 1.0 2.0 3.0)) collect: [:e| e] a Set(1.0 2 3)<br>
>><br>
>> Yes, I would say so. I think we fixed some others like that already (not 100% sure)<br>
>><br>
>> I added an issue tracker entry<br>
>><br>
>> 14535 IdentitySet>>collect: answers a Set, not an IdentitySet.<br>
>> <a href="https://pharo.fogbugz.com/f/cases/14535" target="_blank">https://pharo.fogbugz.com/f/cases/14535</a><br>
>><br>
><br>
> #collect: directly uses Set in Set>>#collect, I committed a fix (to the issue tracker, to be reviewed)<br>
> to use “self species” instead (plus the example from above as a test in IdentitySetTest).<br>
><br>
> Marcus<br>
<br>
</div></div>I think that is the most logical thing to do, it is what I would expect.<br>
<br>
I know others have cases where that is not really what you want (some of Set's subclasses are pretty special), but it is still a good default, while #collect:as: can be used for all other cases (and subclasses can override #species again if they want).<br>
<span class=""><font color="#888888"><br></font></span></blockquote><div><br></div><div>Hmm... errors found by the test runner on that change.</div><div><br></div><div><a href="https://ci.inria.fr/pharo/job/Pharo-4.0-Issue-Validator/17683//artifact/validationReport.html">https://ci.inria.fr/pharo/job/Pharo-4.0-Issue-Validator/17683//artifact/validationReport.html</a><br></div><div><br></div><div>So we will need to check... </div><div> </div></div><div class="gmail_signature"> Marcus</div>
</div></div>