JS: Allow PropAccess when guessing name

This commit is contained in:
Asger F
2019-07-16 17:29:56 +01:00
parent 1c2d874c55
commit b2fcea4fd2
2 changed files with 2 additions and 2 deletions

View File

@@ -229,7 +229,7 @@ class ClassExpr extends @classexpr, ClassDefinition, Expr {
result = p.getName()
)
or
exists(AssignExpr assign, DotExpr prop |
exists(AssignExpr assign, PropAccess prop |
this = assign.getRhs().getUnderlyingValue() and
prop = assign.getLhs() and
result = prop.getPropertyName()

View File

@@ -67,7 +67,7 @@ class Function extends @function, Parameterized, TypeParameterized, StmtContaine
result = p.getName()
)
or
exists(AssignExpr assign, DotExpr prop |
exists(AssignExpr assign, PropAccess prop |
this = assign.getRhs().getUnderlyingValue() and
prop = assign.getLhs() and
result = prop.getPropertyName()