Skip to content

Commit

Permalink
fixed files form Closure #48
Browse files Browse the repository at this point in the history
  • Loading branch information
tdurieux committed Mar 7, 2017
1 parent 132ebfb commit 5c993d1
Showing 1 changed file with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1518,11 +1518,14 @@ void maybeDeclareQualifiedName(NodeTraversal t, JSDocInfo info,
|| FunctionTypeBuilder.isFunctionTypeDeclaration(info));
}

if (inferred) {
if (inferred && rhsValue != null && rhsValue.isFunction()) {
// Determining declaration for #2
inferred = !(rhsValue != null &&
rhsValue.isFunction() &&
(info != null || !scope.isDeclared(qName, false)));
if (info != null) {
inferred = false;
} else if (!scope.isDeclared(qName, false) &&
n.isUnscopedQualifiedName()) {
inferred = false;
}
}

if (!inferred) {
Expand Down

0 comments on commit 5c993d1

Please sign in to comment.