Skip to content

Commit

Permalink
Fix source offsets for qualified constructor call expressions
Browse files Browse the repository at this point in the history
  • Loading branch information
eric-milles committed Apr 17, 2018
1 parent 79d5373 commit cabb416
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ protected void check(ASTNode node, int start, int until) {
protected void checkNameRange(AnnotatedNode node) {
if (sloc.regionIsCoveredByNameRange(node)) {
completeVisitation(node, new Region(
node.getNameStart(), node.getNameEnd() - node.getNameStart()));
node.getNameStart(), (node.getNameEnd()+1) - node.getNameStart()));
}
if (node instanceof ClassNode) {
checkGenerics((ClassNode) node);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2009-2017 the original author or authors.
* Copyright 2009-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -77,7 +77,7 @@ public boolean regionIsCoveredByNode(ASTNode node) {
* @return true iff the node's name range covers the region
*/
public boolean regionIsCoveredByNameRange(AnnotatedNode node) {
return this.start >= node.getNameStart() && this.getEnd() <= node.getNameEnd()+1; // FIXADE why +1?
return this.start >= node.getNameStart() && this.getEnd() <= node.getNameEnd()+1;
}

/**
Expand Down

0 comments on commit cabb416

Please sign in to comment.