[e-lang] Bug (0.8.35n / 0.8.36t): domain.diverge()

Kevin Reid kpreid at mac.com
Tue Sep 19 12:31:02 CDT 2006


On Sep 19, 2006, at 12:38, Mark S. Miller wrote:
> Kevin Reid wrote:
>> ? [1].asMap().diverge().domain().diverge()
>> # problem: <ArrayStoreException>
>> #
>> #   - ESet#diverge()
>> #   . [0].asSet().readOnly().diverge()
>
>
> This is now bug
> https://sourceforge.net/tracker/index.php? 
> func=detail&aid=1561585&group_id=75274&atid=551529
>
> I've reproduced it under on the current svn HEAD version of E,  
> where it acts
> the same. Looking at it under the debugger, the problem seems to be  
> that an
> ESet is normally represented internally as an EMap whose keys  
> column contain
> the elements of the set, and whose values column is a vacuous  
> column of Voids.
> However, an ESet representing the domain of an EMap actually holds  
> onto this
> EMap, ...

Thanks.

While you're looking at this: it would be nice if the print of a  
domain set didn't imply that it is immutable. That is,

? [].asMap().diverge().domain()
# value: [].asMap().diverge().domain()

instead of

? [].asMap().diverge().domain()
# value: [].asSet().readOnly()

which if actually executed yields a ConstSet.

-- 
Kevin Reid                            <http://homepage.mac.com/kpreid/>




More information about the e-lang mailing list