File tree Expand file tree Collapse file tree 1 file changed +4
-9
lines changed
go/ql/lib/semmle/go/dataflow/internal Expand file tree Collapse file tree 1 file changed +4
-9
lines changed Original file line number Diff line number Diff line change @@ -134,10 +134,6 @@ class ArgumentPosition extends int {
134
134
pragma [ inline]
135
135
predicate parameterMatch ( ParameterPosition ppos , ArgumentPosition apos ) { ppos = apos }
136
136
137
- private predicate isInterfaceMethod ( Method c ) {
138
- c .getReceiverBaseType ( ) .getUnderlyingType ( ) instanceof InterfaceType
139
- }
140
-
141
137
/**
142
138
* Holds if `call` is passing `arg` to param `p` in any circumstance except passing
143
139
* a receiver parameter to a concrete method.
@@ -149,9 +145,8 @@ predicate golangSpecificParamArgFilter(
149
145
// Interface methods calls may be passed strictly to that exact method's model receiver:
150
146
arg .getPosition ( ) != - 1
151
147
or
152
- exists ( Function callTarget | callTarget = call .getNode ( ) .( DataFlow:: CallNode ) .getTarget ( ) |
153
- not isInterfaceMethod ( callTarget )
154
- or
155
- callTarget = p .getCallable ( ) .asSummarizedCallable ( ) .asFunction ( )
156
- )
148
+ p instanceof DataFlow:: SummarizedParameterNode
149
+ or
150
+ not call .getNode ( ) .( DataFlow:: CallNode ) .getReceiver ( ) .getType ( ) .getUnderlyingType ( ) instanceof
151
+ InterfaceType
157
152
}
You can’t perform that action at this time.
0 commit comments