-
Bug
-
Resolution: Unresolved
-
Minor
-
Jenkins 2.32.3, 2.46.3
Shared Groovy Libraries 2.7, 2.8
Pipeline Groovy 2.33, 2.34
define method in shared library:
int getValue() { int i = 1 i = ++i }
throw exception:
Caused by: hudson.remoting.ProxyException: groovy.lang.MissingMethodException: No signature of method: com.cloudbees.groovy.cps.Builder.prefixInc() is applicable for argument types: (java.lang.Integer, com.cloudbees.groovy.cps.impl.FunctionCallBlock) values: [83, com.cloudbees.groovy.cps.impl.FunctionCallBlock@66ea8f12] Possible solutions: prefixInc(int, com.cloudbees.groovy.cps.LValueBlock), prefixDec(int, com.cloudbees.groovy.cps.LValueBlock), postfixInc(int, com.cloudbees.groovy.cps.LValueBlock) at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:58)
If I change
++i
to
i + 1
, all work perfectly.