Skip to content

Commit

Permalink
Fix expression extraction within ClassTypeHelper
Browse files Browse the repository at this point in the history
  • Loading branch information
SomeRanDev committed Jan 13, 2025
1 parent 2b3057d commit 287184e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/reflaxe/helpers/ClassTypeHelper.hx
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,17 @@ class ClassTypeHelper {
}

final exprList: Null<Array<TypedExpr>> = switch(constructorExpr.expr) {
// For when using ClassField.expr()
case TFunction(tfunc): {
switch(tfunc.expr.expr) {
case TBlock(exprList): exprList;
case _: return null;
}
}

// For when using `overrideConstructorExpr`
case TBlock(exprList): exprList;

case _: return null;
}

Expand Down

0 comments on commit 287184e

Please sign in to comment.