Skip to content

Commit

Permalink
When Preconditions check fails, include the Node so it's easier to de…
Browse files Browse the repository at this point in the history
…bug.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=136790920
  • Loading branch information
tbreisacher authored and blickly committed Oct 21, 2016
1 parent 7d18f39 commit 11c7bef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/com/google/javascript/jscomp/GlobalTypeInfo.java
Original file line number Diff line number Diff line change
Expand Up @@ -1705,7 +1705,7 @@ private void visitNamespacePropertyDeclaration(Node getProp) {

private void visitNamespacePropertyDeclaration(
Node declNode, Node recv, String pname) {
Preconditions.checkArgument(declNode.isGetProp() || declNode.isStringKey());
Preconditions.checkArgument(declNode.isGetProp() || declNode.isStringKey(), declNode);
Preconditions.checkArgument(currentScope.isNamespace(recv));
// Named types have already been crawled in CollectNamedTypes
if (declNode.isStringKey() && currentScope.isNamespace(declNode.getFirstChild())) {
Expand Down

0 comments on commit 11c7bef

Please sign in to comment.