gciatto / kt-math

Pure Kotlin porting of Java's BigIntegers and BigDecimals (along with java.math.*)
GNU General Public License v2.0
27 stars 4 forks source link

fix: ClassCastException calling divideAndRemainder #306

Open hakanai opened 3 weeks ago

hakanai commented 3 weeks ago

adaptAll was calling castTo(), which failed because JavaBigIntegerAdapter isn't a JavaBigInteger.

I looked at the single-value adapt method which didn't have the same issue, and changed adaptAll to work similarly.

Fixes #305.