Fix CP in typeFlowParamType

Forgot to link `p` with `c` using `nodeEnclosingCallable(p, c)`.
This commit is contained in:
Tom Hvitved
2026-04-09 09:18:08 +02:00
parent 0d4524f8f3
commit d704b753c8

View File

@@ -2115,11 +2115,13 @@ module MakeImplCommon<LocationSig Location, InputSig<Location> Lang> {
* context.
*/
private predicate typeFlowParamType(ParamNode p, Type t, boolean cc) {
exists(Callable c |
Input::dataFlowNonCallEntry(c, cc) and
if cc = true and exists(getSourceContextParameterNodeType(p))
then t = getSourceContextParameterNodeType(p)
else trackedParamWithType(p, t, c)
exists(Callable c | Input::dataFlowNonCallEntry(c, cc) |
cc = true and
nodeEnclosingCallable(p, c) and
t = getSourceContextParameterNodeType(p)
or
(cc = false or not exists(getSourceContextParameterNodeType(p))) and
trackedParamWithType(p, t, c)
)
or
exists(Type t1, Type t2 |