File tree Expand file tree Collapse file tree 1 file changed +3
-8
lines changed
javascript/ql/lib/semmle/javascript/dataflow/internal Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -583,19 +583,14 @@ class DataFlowType extends TDataFlowType {
583583 DataFlow:: ClassNode asInstanceOfClass ( ) { this = TInstanceType ( result ) }
584584}
585585
586- private predicate typeStrongerThan1 ( DataFlowType t1 , DataFlowType t2 ) {
587- // 't1' is a subclass of 't2'
588- t1 .asInstanceOfClass ( ) = t2 .asInstanceOfClass ( ) .getADirectSubClass ( )
589- }
590-
591586/**
592587 * Holds if `t1` is strictly stronger than `t2`.
593588 */
594589predicate typeStrongerThan ( DataFlowType t1 , DataFlowType t2 ) {
595- typeStrongerThan1 ( t1 , t2 )
590+ // 't1' is a subclass of 't2'
591+ t1 .asInstanceOfClass ( ) = t2 .asInstanceOfClass ( ) .getADirectSubClass + ( )
596592 or
597- // Ensure all types are transitively stronger than 'any'
598- not typeStrongerThan1 ( t1 , _) and
593+ // Ensure all types are stronger than 'any'
599594 not t1 = TAnyType ( ) and
600595 t2 = TAnyType ( )
601596}
You can’t perform that action at this time.
0 commit comments