Skip to content

Commit d428a00

Browse files
committed
haxe 3.1.3 compatible bugfix of stacktrace problem
1 parent 985ab41 commit d428a00

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

checkstyle/checks/CyclomaticComplexityCheck.hx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@ class CyclomaticComplexityCheck extends Check {
5454
if (e == null) {
5555
return 0;
5656
}
57+
if (e.expr == null) {
58+
return 0;
59+
}
5760
return switch(e.expr) {
5861
case ExprDef.EArray(e1, e2) : evaluateExpr(e1) + evaluateExpr(e2);
5962
case ExprDef.EBinop(op, e1, e2) : evaluateExpr(e1) + evaluateExpr(e2) + switch(op) {
@@ -99,7 +102,6 @@ class CyclomaticComplexityCheck extends Check {
99102
case ExprDef.EDisplay(e, _) : evaluateExpr(e);
100103
case ExprDef.ETernary(econd, eif, eelse) : 1 + evaluateExpr(econd) + evaluateExpr(eif) + evaluateExpr(eelse);
101104
case ExprDef.ECheckType(e, _) : evaluateExpr(e);
102-
case null: 0;
103105
default: 0;
104106
}
105107
}

0 commit comments

Comments
 (0)