We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a8a28a5 commit 319210aCopy full SHA for 319210a
javascript/ql/lib/semmle/javascript/frameworks/ClassValidator.qll
@@ -3,6 +3,7 @@
3
*/
4
5
import javascript
6
+private import semmle.javascript.internal.NameResolution
7
private import semmle.javascript.internal.TypeResolution
8
private import semmle.javascript.internal.UnderlyingTypes
9
@@ -52,7 +53,10 @@ module ClassValidator {
52
53
54
pragma[noinline]
55
private ClassDefinition getClassReferencedByPropRead(DataFlow::PropRead read) {
- UnderlyingTypes::nodeHasUnderlyingClassType(read.getBase().asExpr(), result.flow())
56
+ exists(NameResolution::Node type |
57
+ TypeResolution::valueHasType(read.getBase().asExpr(), type) and
58
+ UnderlyingTypes::nodeHasUnderlyingClassType(type, result.flow())
59
+ )
60
}
61
62
/**
0 commit comments