File tree Expand file tree Collapse file tree
src/main/java/unquietcode/tools/flapi Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -519,4 +519,9 @@ public boolean compilerEquivalent(MethodParser other) {
519519 // otherwise, equal (probably)
520520 return true ;
521521 }
522+
523+ // return the number of parameters, accounting for varargs
524+ public int parameterCount () {
525+ return params .size () + (varargType != null ? 1 : 0 );
526+ }
522527}
Original file line number Diff line number Diff line change @@ -88,7 +88,7 @@ public void visit(LateralTransition transition) {
8888
8989 // if no specific parameters, start after the last regular parameter
9090 if (transition .getChainParameterPositions ().isEmpty ()) {
91- final int offset = new MethodParser (transition .getMethodSignature ()).params . size ();
91+ final int offset = new MethodParser (transition .getMethodSignature ()).parameterCount ();
9292
9393 positionFunction = new Function <Integer , Integer >() {
9494 public Integer apply (Integer idx ) {
You can’t perform that action at this time.
0 commit comments