Skip to content

Commit

Permalink
Fix null-safety issue
Browse files Browse the repository at this point in the history
  • Loading branch information
SomeRanDev committed Dec 7, 2023
1 parent 18ff77d commit 488e30e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/gdcompiler/GDCompiler.hx
Original file line number Diff line number Diff line change
Expand Up @@ -733,7 +733,8 @@ func _exit_tree():
}
result.add(compileExpressionOrError(expr));
if(hasModuleType) {
result.addMulti(" as ", TComp.compileType(TypeHelper.fromModuleType(maybeModuleType.trustMe()), expr.pos), ")");
final typeCode = TComp.compileType(TypeHelper.fromModuleType(maybeModuleType.trustMe()), expr.pos);
result.addMulti(" as ", typeCode ?? "Variant", ")");
}
}
case TMeta(_, expr): {
Expand Down

0 comments on commit 488e30e

Please sign in to comment.