mirror of
https://github.com/github/codeql.git
synced 2026-04-30 03:05:15 +02:00
Swaps wrong_args globally
This commit is contained in:
@@ -107,7 +107,7 @@ predicate too_many_args_objectapi(Call call, Object callable, int limit) {
|
||||
}
|
||||
|
||||
/** Holds if `call` has too many or too few arguments for `func` */
|
||||
predicate wrong_args(Call call, FunctionObject func, int limit, string too) {
|
||||
predicate wrong_args_objectapi(Call call, FunctionObject func, int limit, string too) {
|
||||
too_few_args_objectapi(call, func, limit) and too = "too few"
|
||||
or
|
||||
too_many_args_objectapi(call, func, limit) and too = "too many"
|
||||
|
||||
@@ -15,7 +15,7 @@ import Expressions.CallArgs
|
||||
from Call call, FunctionObject func, FunctionObject overridden, string problem
|
||||
where
|
||||
func.overrides(overridden) and (
|
||||
wrong_args(call, func, _, problem) and correct_args_if_called_as_method(call, overridden)
|
||||
wrong_args_objectapi(call, func, _, problem) and correct_args_if_called_as_method(call, overridden)
|
||||
or
|
||||
exists(string name |
|
||||
illegally_named_parameter_objectapi(call, func, name) and problem = "an argument named '" + name + "'" and
|
||||
|
||||
Reference in New Issue
Block a user