From d746da2c2323dfc6646f28c5e2d2a39fbf92b458 Mon Sep 17 00:00:00 2001 From: Hyper_ <40342021+NotHyper-474@users.noreply.github.com> Date: Thu, 23 Jul 2026 21:13:58 -0300 Subject: [PATCH] Fix null access when stringifying function argument Some functions may have arguments that have no types specified, and `Printer` didn't take that into account. --- polymod/hscript/_internal/Printer.hx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/polymod/hscript/_internal/Printer.hx b/polymod/hscript/_internal/Printer.hx index b1ddc2d8..c7e33356 100644 --- a/polymod/hscript/_internal/Printer.hx +++ b/polymod/hscript/_internal/Printer.hx @@ -642,7 +642,8 @@ class Printer { var arg:Argument = f.args[i]; if (arg.opt ?? false) output += "?"; - output += arg.name + ":" + this.typeToString(arg.t); + output += arg.name; + if (arg.t != null) output += ":" + this.typeToString(arg.t); if (arg.value != null) output += " = " + this.exprToString(arg.value); if (i < f.args.length - 1) output += ", ";