add support for map.set in Immutable model

This commit is contained in:
Erik Krogh Kristensen
2021-02-03 19:39:12 +01:00
parent b77dd54618
commit b1f092f052
3 changed files with 10 additions and 2 deletions

View File

@@ -50,7 +50,12 @@ private module Immutable {
pred = call.getOptionArgument(0, key) and
result = call
)
// TODO: map set.
or
exists(DataFlow::CallNode call | call = immutableMap().getMember("set").getACall() |
prop = mapValue(call.getArgument(0)) and
pred = call.getArgument(1) and
result = call
)
}
/**