Skip to content

Commit

Permalink
fixed bug in readBlock passing incorrect child token
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexHaxe committed May 22, 2022
1 parent f6b3be2 commit d5d2a96
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 7 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## dev branch / next version (2.x.x)

## 2.2.2 (2022-05-23)

- fixed bug in readBlock passing incorrect child token

## 2.2.1 (2022-05-20)

- fixed local var scope
Expand Down
4 changes: 2 additions & 2 deletions haxelib.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
"refactor"
],
"description": "A code renaming tool for Haxe",
"version": "2.2.1",
"releasenote": "fixed local var scope - see CHANGELOG",
"version": "2.2.2",
"releasenote": "fixed bug in readBlock passing incorrect child token - see CHANGELOG",
"contributors": [
"AlexHaxe"
],
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@haxecheckstyle/haxe-rename",
"version": "2.2.1",
"version": "2.2.2",
"description": "Renaming tool for Haxe",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion src/refactor/Refactor.hx
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ class Refactor {
case CaseLabel(_):
Promise.reject(RefactorResult.Unsupported(identifier.toString()).printRefactorResult());
case ScopedLocal(scopeStart, scopeEnd, type):
context.verboseLog('rename scoped local "${identifier.name} [$scopeStart - $scopeEnd]" (${type.scopeTypeToString()}) to "${context.what.toName}"');
context.verboseLog('rename scoped local "${identifier.name}" (${type.scopeTypeToString()}) to "${context.what.toName}"');
RenameScopedLocal.refactorScopedLocal(context, file, identifier, scopeStart, scopeEnd);
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/refactor/discover/UsageCollector.hx
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,7 @@ class UsageCollector {
case Kwd(KwdFunction):
child = child.getFirstChild();
var method:Identifier = makeIdentifier(context, child, ScopedLocal(child.pos.min, scopeEnd, Var), identifier);
readMethod(context, method, child.getFirstChild());
readMethod(context, method, child);
case Dot:
case Semicolon:
default:
Expand Down

0 comments on commit d5d2a96

Please sign in to comment.