So the problem here, at least initially, isn't the trampolining - it's ambiguity on types. I found this, which suggested changing from number * theFactorial to number * (theFactorial ?: 1), at which point the error went away. But! TrampolineClosure isn't going to work in CPS Pipeline code in general - pretty much anything that nests a Closure#call invocation inside a class that's defined outside of the Pipeline code (i.e., TrampolineClosure and its calls to original.call(...) is going to result in confusion. This'll work fine in a @NonCPS-annotated method, though.
This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.