Skip to content

Commit

Permalink
Avoid getQualifiedName when only a name is allowed.
Browse files Browse the repository at this point in the history
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=248353620
  • Loading branch information
concavelenz authored and lauraharker committed May 15, 2019
1 parent d330761 commit d8b2c25
Showing 1 changed file with 5 additions and 2 deletions.
Expand Up @@ -528,8 +528,11 @@ private void processMemberDef(NodeTraversal t, Node n) {
return;
}

String className = NodeUtil.getName(n.getGrandparent());
Var var = className == null ? null : t.getScope().getVar(className);
Node classNameNode = NodeUtil.getNameNode(n.getGrandparent());
Var var =
(classNameNode != null && classNameNode.isName())
? t.getScope().getVar(classNameNode.getString())
: null;
getNameInfoForName(name, PROPERTY)
.getDeclarations()
.add(new ClassMemberFunction(n, var, t.getModule()));
Expand Down

0 comments on commit d8b2c25

Please sign in to comment.