Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.7.2
-
None
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.