File tree Expand file tree Collapse file tree 1 file changed +13
-6
lines changed
com.ibm.wala.cast.python.ml/source/com/ibm/wala/cast/python/ml/client Expand file tree Collapse file tree 1 file changed +13
-6
lines changed Original file line number Diff line number Diff line change @@ -669,19 +669,26 @@ protected int getArgumentValueNumber(int parameterPosition) {
669669 : this .getNode ().getIR ().getParameter (parameterPosition + 1 );
670670 }
671671
672- protected int getArgumentValueNumber (PropagationCallGraphBuilder builder , int paramPos ) {
672+ protected int getArgumentValueNumber (
673+ PropagationCallGraphBuilder builder , int paramPos , boolean optional ) {
673674 Set <Integer > numArgs = this .getNumberOfPossiblePositionalArguments (builder );
674675
675676 if (!numArgs .stream ().anyMatch (n -> n >= paramPos + 1 ))
676- throw new IllegalStateException (
677- "Cannot determine value number for parameter at position "
678- + paramPos
679- + " of "
680- + this .getSignature ());
677+ if (optional ) return -1 ;
678+ else
679+ throw new IllegalStateException (
680+ "Cannot determine value number for parameter at position "
681+ + paramPos
682+ + " of "
683+ + this .getSignature ());
681684
682685 return this .getArgumentValueNumber (paramPos );
683686 }
684687
688+ protected int getArgumentValueNumber (PropagationCallGraphBuilder builder , int paramPos ) {
689+ return this .getArgumentValueNumber (builder , paramPos , false );
690+ }
691+
685692 /**
686693 * Returns the set of possible numbers of positional arguments passed to the range function at the
687694 * call.
You can’t perform that action at this time.
0 commit comments