JavaScript: Restrict InstanceFieldAsPropWrite to fields with initializers.

This commit is contained in:
Max Schaefer
2019-02-09 15:39:28 +00:00
parent 184e65d8a1
commit 10ef945b51
3 changed files with 19 additions and 2 deletions

View File

@@ -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() {