File tree 1 file changed +3
-8
lines changed
javascript/ql/lib/semmle/javascript/dataflow/internal
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 {
583
583
DataFlow:: ClassNode asInstanceOfClass ( ) { this = TInstanceType ( result ) }
584
584
}
585
585
586
- private predicate typeStrongerThan1 ( DataFlowType t1 , DataFlowType t2 ) {
587
- // 't1' is a subclass of 't2'
588
- t1 .asInstanceOfClass ( ) = t2 .asInstanceOfClass ( ) .getADirectSubClass ( )
589
- }
590
-
591
586
/**
592
587
* Holds if `t1` is strictly stronger than `t2`.
593
588
*/
594
589
predicate typeStrongerThan ( DataFlowType t1 , DataFlowType t2 ) {
595
- typeStrongerThan1 ( t1 , t2 )
590
+ // 't1' is a subclass of 't2'
591
+ t1 .asInstanceOfClass ( ) = t2 .asInstanceOfClass ( ) .getADirectSubClass + ( )
596
592
or
597
- // Ensure all types are transitively stronger than 'any'
598
- not typeStrongerThan1 ( t1 , _) and
593
+ // Ensure all types are stronger than 'any'
599
594
not t1 = TAnyType ( ) and
600
595
t2 = TAnyType ( )
601
596
}
You can’t perform that action at this time.
0 commit comments