recursive-gen invokes resize with non-integer size

Description

Not sure if this is a bug or if I'm doing something wrong, but my recursive generator will occasionally throw this exception:

It seems the resize function is being called with a non-integer value, which appears incorrect to my admittedly untrained eyes. It seems to originate from the call to (Math/pow size (/ 1 height)) that is used to initialize children-size on line 1337 of generators.cljc. Wrapping it in a call to long appears to fix the issue.

Environment

test.check 0.9.0
clojure 1.9.0
java 1.8.0_92
macOS 10.13.3

Activity

Show:
gfredericks
April 5, 2018, 11:03 PM

Sounds straightforward; thanks for the report.

gfredericks
April 8, 2018, 8:47 PM

Actually I think this is already fixed on master; let me know if you disagree.

Completed

Assignee

gfredericks

Reporter

import

Labels

Approval

None

Patch

None

Priority

Major