Skip to content

Commit 127bb36

Browse files
committed
Bugfixes
1 parent 1f8cb9f commit 127bb36

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

checkstyle/ComplexTypeUtils.hx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,8 @@ class ComplexTypeUtils {
114114
if (c.expr != null) walkExpr(c.expr, cb);
115115
}
116116

117-
public static function walkCatch(c:Catch, pos:Position, cb:ComplexTypeCallback) {
118-
walkComplexType(c.type, c.name, pos, cb);
117+
public static function walkCatch(c:Catch, cb:ComplexTypeCallback) {
118+
walkComplexType(c.type, c.name, c.expr.pos, cb);
119119
walkExpr(c.expr, cb);
120120
}
121121

@@ -188,7 +188,7 @@ class ComplexTypeUtils {
188188
if (edef != null && edef.expr != null) walkExpr(edef, cb);
189189
case ETry(e, catches):
190190
walkExpr(e, cb);
191-
for (c in catches) walkCatch(c, e.pos, cb);
191+
for (c in catches) walkCatch(c, cb);
192192
case EReturn(e):
193193
if (e != null) walkExpr(e, cb);
194194
case EBreak:
@@ -197,16 +197,16 @@ class ComplexTypeUtils {
197197
case EThrow(e): walkExpr(e, cb);
198198
case ECast(e, t):
199199
walkExpr(e, cb);
200-
if (t != null) walkComplexType(t, t.getName(), e.pos, cb);
200+
if (t != null) walkComplexType(t, "", e.pos, cb);
201201
case EDisplay(e, isCall): walkExpr(e, cb);
202-
case EDisplayNew(t): walkTypePath(t, "", e.pos, cb);
202+
case EDisplayNew(t): walkTypePath(t, t.name, e.pos, cb);
203203
case ETernary(econd, eif, eelse):
204204
walkExpr(econd, cb);
205205
walkExpr(eif, cb);
206206
walkExpr(eelse, cb);
207207
case ECheckType(e, t):
208208
walkExpr(e, cb);
209-
walkComplexType(t, t.getName(), e.pos, cb);
209+
walkComplexType(t, "", e.pos, cb);
210210
case EMeta(s, e):
211211
if (s.params != null) for (mp in s.params) walkExpr(mp, cb);
212212
walkExpr(e, cb);

checkstyle/checks/DynamicCheck.hx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class DynamicCheck extends Check {
2525
if (isPosSuppressed (pos)) return;
2626
switch (t) {
2727
case TPath(p):
28-
if (Std.string (p).indexOf ("name => Dynamic") > -1) _error (name, pos);
28+
if (p.name == "Dynamic") _error (name, pos);
2929
default:
3030
}
3131
}

0 commit comments

Comments
 (0)