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 {
134134pragma [ inline]
135135predicate parameterMatch ( ParameterPosition ppos , ArgumentPosition apos ) { ppos = apos }
136136
137- private predicate isInterfaceMethod ( Method c ) {
138- c .getReceiverBaseType ( ) .getUnderlyingType ( ) instanceof InterfaceType
139- }
140-
141137/**
142138 * Holds if `call` is passing `arg` to param `p` in any circumstance except passing
143139 * a receiver parameter to a concrete method.
@@ -149,9 +145,8 @@ predicate golangSpecificParamArgFilter(
149145 // Interface methods calls may be passed strictly to that exact method's model receiver:
150146 arg .getPosition ( ) != - 1
151147 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
157152}
You can’t perform that action at this time.
0 commit comments