Skip to content

Commit d5d2a96

Browse files
committed
fixed bug in readBlock passing incorrect child token
1 parent f6b3be2 commit d5d2a96

File tree

6 files changed

+11
-7
lines changed

6 files changed

+11
-7
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

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

5+
## 2.2.2 (2022-05-23)
6+
7+
- fixed bug in readBlock passing incorrect child token
8+
59
## 2.2.1 (2022-05-20)
610

711
- fixed local var scope

haxelib.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
"refactor"
99
],
1010
"description": "A code renaming tool for Haxe",
11-
"version": "2.2.1",
12-
"releasenote": "fixed local var scope - see CHANGELOG",
11+
"version": "2.2.2",
12+
"releasenote": "fixed bug in readBlock passing incorrect child token - see CHANGELOG",
1313
"contributors": [
1414
"AlexHaxe"
1515
],

package-lock.json

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@haxecheckstyle/haxe-rename",
3-
"version": "2.2.1",
3+
"version": "2.2.2",
44
"description": "Renaming tool for Haxe",
55
"repository": {
66
"type": "git",

src/refactor/Refactor.hx

+1-1
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ class Refactor {
120120
case CaseLabel(_):
121121
Promise.reject(RefactorResult.Unsupported(identifier.toString()).printRefactorResult());
122122
case ScopedLocal(scopeStart, scopeEnd, type):
123-
context.verboseLog('rename scoped local "${identifier.name} [$scopeStart - $scopeEnd]" (${type.scopeTypeToString()}) to "${context.what.toName}"');
123+
context.verboseLog('rename scoped local "${identifier.name}" (${type.scopeTypeToString()}) to "${context.what.toName}"');
124124
RenameScopedLocal.refactorScopedLocal(context, file, identifier, scopeStart, scopeEnd);
125125
}
126126
}

src/refactor/discover/UsageCollector.hx

+1-1
Original file line numberDiff line numberDiff line change
@@ -568,7 +568,7 @@ class UsageCollector {
568568
case Kwd(KwdFunction):
569569
child = child.getFirstChild();
570570
var method:Identifier = makeIdentifier(context, child, ScopedLocal(child.pos.min, scopeEnd, Var), identifier);
571-
readMethod(context, method, child.getFirstChild());
571+
readMethod(context, method, child);
572572
case Dot:
573573
case Semicolon:
574574
default:

0 commit comments

Comments
 (0)