Skip to content

Commit 4cc33f2

Browse files
committed
fixed module level static only for Haxe 4
1 parent f00c5c2 commit 4cc33f2

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

src/checkstyle/utils/ComplexTypeUtils.hx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,10 @@ class ComplexTypeUtils {
1919
walkTypedef(d, td.pos, cb);
2020
case EUsing(path):
2121
walkTypePath(path, path.name, td.pos, cb);
22+
#if haxe4
2223
case EStatic(s):
2324
walkStatic(s, td.pos, cb);
25+
#end
2426
}
2527
}
2628

@@ -87,9 +89,11 @@ class ComplexTypeUtils {
8789
}
8890
}
8991

92+
#if haxe4
9093
public static function walkStatic(s:Definition<StaticFlag, FieldType>, pos:Position, cb:ComplexTypeCallback) {
9194
walkField(cast s, cb);
9295
}
96+
#end
9397

9498
public static function walkVar(v:Var, pos:Position, cb:ComplexTypeCallback) {
9599
if (v.type != null) walkComplexType(v.type, v.name, pos, cb);

src/checkstyle/utils/ExprUtils.hx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,10 @@ class ExprUtils {
1919
walkTypedef(d, cb);
2020
case EUsing(path):
2121
walkTypePath(path, cb);
22+
#if haxe4
2223
case EStatic(s):
2324
walkStatic(s, td.pos, cb);
25+
#end
2426
}
2527
}
2628

@@ -87,9 +89,11 @@ class ExprUtils {
8789
}
8890
}
8991

92+
#if haxe4
9093
public static function walkStatic(s:Definition<StaticFlag, FieldType>, pos:Position, cb:Expr -> Void) {
9194
walkField(cast s, cb);
9295
}
96+
#end
9397

9498
public static function walkVar(v:Var, cb:Expr -> Void) {
9599
if (v.type != null) walkComplexType(v.type, cb);

0 commit comments

Comments
 (0)