Skip to content

Commit d3ebf88

Browse files
authored
Link calls with METHOD_REF receiver. (#1021)
No linking those calls was a leftover from when METHOD_REF node where no proper expressions and had no type associated. Also fixed error in CPG format spec. JUMP_TARGET cannot be the destination of a RECEIVER edge originating from a CALL since JUMP_TARGET is not an EXPRESSION.
1 parent bc7ac5c commit d3ebf88

2 files changed

Lines changed: 0 additions & 2 deletions

File tree

  • schema/src/main/resources/schemas
  • semanticcpg/src/main/scala/io/shiftleft/semanticcpg/passes/linking/calllinker

schema/src/main/resources/schemas/base.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,6 @@
258258
{"name": "METHOD_REF", "cardinality": "0-1:0-1"},
259259
{"name": "TYPE_REF"},
260260
{"name": "BLOCK", "cardinality": "0-1:0-1"},
261-
{"name": "JUMP_TARGET"},
262261
{"name": "CONTROL_STRUCTURE"},
263262
{"name": "UNKNOWN"}
264263
]},

semanticcpg/src/main/scala/io/shiftleft/semanticcpg/passes/linking/calllinker/CallLinker.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ class CallLinker(cpg: Cpg) extends CpgPass(cpg) {
5454
if (receiverIt.hasNext) {
5555
val receiver = receiverIt.next
5656
receiver match {
57-
case methodRefReceiver: nodes.MethodRef => // nothing
5857
case _ =>
5958
val receiverTypeDecl = receiver
6059
._evalTypeOut()

0 commit comments

Comments
 (0)