You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cpg.call.codeExact("...").head match {
case (call : nodes.Call) :: Nil =>
println(call.argument.l.length)
}
leads to compiler error:
missing argument list for method argument in class CallMethods
[error] Unapplied methods are only converted to functions when a function type is expected.
[error] You can make this conversion explicit by writing `argument _` or `argument(_)` instead of `argument`.
When applying the suggested fix:
cpg.call.codeExact("...").head match {
case (call : nodes.Call) :: Nil =>
println(call.argument(_).l.length)
}
I get the compiler error:
missing parameter type for expanded function ((<x$1: error>) => call.argument(x$1).l.length.shouldBe(1))
[error] println(call.argument(_).l.length)
[error]
I was expecting to simply print the amount of arguments connected to that call node.
Current work-around:
cpg.call.codeExact("...").head match {
case (call : nodes.Call) :: Nil =>
println(call.out(EdgeTypes.ARGUMENT).asScala.toList.length)
}
I am using cpg version: 1.2.25
The text was updated successfully, but these errors were encountered:
leads to compiler error:
When applying the suggested fix:
I get the compiler error:
I was expecting to simply print the amount of arguments connected to that call node.
Current work-around:
I am using cpg version: 1.2.25
The text was updated successfully, but these errors were encountered: