We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a8284c0 commit 233b791Copy full SHA for 233b791
javascript/ql/lib/semmle/javascript/dataflow/internal/DataFlowPrivate.qll
@@ -373,13 +373,19 @@ predicate neverSkipInPathGraph(Node node) {
373
374
string ppReprType(DataFlowType t) { none() }
375
376
+pragma[inline]
377
+private predicate compatibleTypesNonSymRefl(DataFlowType t1, DataFlowType t2) {
378
+ t1 != TAnyType() and
379
+ t2 = TAnyType()
380
+}
381
+
382
pragma[inline]
383
predicate compatibleTypes(DataFlowType t1, DataFlowType t2) {
384
t1 = t2
385
or
- t1 instanceof TAnyType and exists(t2)
386
+ compatibleTypesNonSymRefl(t1, t2)
387
- t2 instanceof TAnyType and exists(t1)
388
+ compatibleTypesNonSymRefl(t2, t1)
389
}
390
391
predicate forceHighPrecision(Content c) { none() }
0 commit comments