Skip to content

Commit 62489e1

Browse files
committed
Fix viableCallable for function variables
1 parent 69c9099 commit 62489e1

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

ql/lib/semmle/go/dataflow/internal/DataFlowDispatch.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ private predicate isInterfaceCallReceiver(
1010
) {
1111
call.getReceiver() = recv and
1212
recv.getType().getUnderlyingType() = tp and
13-
m = call.getCalleeName()
13+
m = call.getACalleeIncludingExternals().asFunction().getName()
1414
}
1515

1616
/** Gets a data-flow node that may flow into the receiver value of `call`, which is an interface value. */
Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,2 @@
11
missingCallee
2-
| test.go:44:2:44:8 | call to f1 | test.go:17:1:20:1 | function declaration |
3-
| test.go:48:2:48:8 | call to f2 | test.go:17:1:20:1 | function declaration |
4-
| test.go:48:2:48:8 | call to f2 | test.go:36:1:39:1 | function declaration |
5-
| test.go:52:2:52:5 | call to f3 | test.go:11:1:11:28 | function declaration |
62
spuriousCallee

0 commit comments

Comments
 (0)