mirror of
https://github.com/github/codeql.git
synced 2026-04-28 10:15:14 +02:00
JavaScript: Restrict InstanceFieldAsPropWrite to fields with initializers.
This commit is contained in:
@@ -555,14 +555,15 @@ module DataFlow {
|
||||
}
|
||||
|
||||
/**
|
||||
* An instance field, seen as a property write.
|
||||
* An instance field with an initializer, seen as a property write.
|
||||
*/
|
||||
private class InstanceFieldAsPropWrite extends PropWrite, PropNode {
|
||||
override FieldDefinition prop;
|
||||
|
||||
InstanceFieldAsPropWrite() {
|
||||
not prop.isStatic() and
|
||||
not prop instanceof ParameterField
|
||||
not prop instanceof ParameterField and
|
||||
exists(prop.getInit())
|
||||
}
|
||||
|
||||
override Node getBase() {
|
||||
|
||||
Reference in New Issue
Block a user