Skip to content

Commit

Permalink
Fix Complex.is-prime dispatch hang
Browse files Browse the repository at this point in the history
They go into Cool.is-prime and then we infiniloop as Complex.Numeric
just gives a Complex.

Fix by coercing to Real instead.
  • Loading branch information
zoffixznet committed Dec 26, 2017
1 parent c4d6c16 commit b2b39ba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/Cool.pm
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ my class Cool { # declared in BOOTSTRAP
method cotanh() { self.Numeric.cotanh }
method acotanh() { self.Numeric.acotanh }
method cis() { self.Numeric.cis }
method is-prime(--> Bool:D) { self.Numeric.is-prime }
method is-prime(--> Bool:D) { self.Real.is-prime }

proto method log(|) {*}
multi method log(Cool:D: ) { self.Numeric.log }
Expand Down

0 comments on commit b2b39ba

Please sign in to comment.