GlenKPeterson / Paguro

Generic, Null-safe, Immutable Collections and Functional Transformations for the JVM
Other
312 stars 24 forks source link

ClassCastException after updating from 3.6.0 to 3.7.1 #47

Closed fcurts closed 2 years ago

fcurts commented 2 years ago

According to its type signature, RrbTree#ImRrbt.split() returns Tuple2<ImRrbt<E>,ImRrbt<E>>. But after updating to 3.7.1, it actually returns Tuple2<MutRrbt<E>,ImRrbt<E>> (at least in some cases), resulting in the following ClassCastException:

class org.organicdesign.fp.collections.RrbTree$MutRrbt cannot be cast to class org.organicdesign.fp.collections.RrbTree$ImRrbt (org.organicdesign.fp.collections.RrbTree$MutRrbt and org.organicdesign.fp.collections.RrbTree$ImRrbt are in unnamed module of loader 'app')

Same with 3.7.0.

GlenKPeterson commented 2 years ago

Thank you for reporting this! Your issue should be fixed in 3.7.2, just deployed to Sonatype.