Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.7.2
-
Fix Version/s: 1.7.3, 1.8-beta-1
-
Component/s: parser-antlr
-
Labels:None
-
Number of attachments :
Description
ReturnAdder.addReturnsIfNeeded() does not add source locations in the following places (in Groovy 1.7.2):
line 126:
return new BlockStatement(list,block.getVariableScope());
Should be:
BlockStatement newBlock = new BlockStatement(list,block.getVariableScope());
newBlock.setSourcePosition(block);
return newBlock;
line 135:
return new BlockStatement(list,new VariableScope(scope));
Should be:
BlockStatement newBlock = new BlockStatement(list,new VariableScope(scope));
newBlock.setSourcePosition(statement);
return newBlock;
Apologies for not sending a proper patch file, but I am working off the source jar, rather than the svn project. If you prefer, I can send a proper patch. Thanks.