Closed pniederw closed 8 years ago
THANK YOU! This is fixed in 2.0.7. Also union() for sets had the same issue which is taken care of. You are probably the only person to use last night's build, so I'm going to correct the other places where I wrote this and just tell you that I renamed some of the stuff I just made public:
persistent()
method on all of those interfaces is now immutable()
asTransient()
method on all of those interfaces is now mutable()
Justification (such as it is) for these changes is in the latest CHANGE_LOG. At some point, I'll have to be more conservative about releases and changes.
Peter,
I can't express how nice it is to make a release and have it tested (or at least tried out) the next day. Your bug reports and comments have been really helpful. I wanted you to know how much I appreciate these reports and suggestions! Thank you.
Sincerely, Glen
Glen, it's the least I can do. Thanks for this great project.
I'm running into a problem with 2.0.7:
java.lang.ClassCastException: org.organicdesign.fp.collections.PersistentVector cannot be cast to org.organicdesign.fp.collections.MutableList
at org.organicdesign.fp.collections.MutableList.concat(MutableList.java:17)
It seems that MutableList.concat
now calls ImList.concat
, which returns an immutable list. Therefore, casting to MutableList
in MutableList.concat
fails.
Sorry about that. Fix is in 2.0.8, available now. I made sure to write a test for this, prove that the test showed the error, then prove that it's fixed.
2.0.8 works fine. Thanks.
I think
ImListTrans
should overrideconcat
, refining the return type toImListTrans
.PS: Thanks for transient collections. Big improvement for my use case.