From 7f6966f1134d7c642d9f617fb5192d1fc53b9e22 Mon Sep 17 00:00:00 2001 From: Pavel Shevaev Date: Thu, 7 Sep 2023 19:32:42 +0300 Subject: [PATCH] Improving support for native enum types --- tpl/macro.twig | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tpl/macro.twig b/tpl/macro.twig index b6a62f5..bb114db 100644 --- a/tpl/macro.twig +++ b/tpl/macro.twig @@ -560,7 +560,13 @@ Script_{{o.name|norm_name}}.Method_{{m.name}}.ReturnValue(frm, stack {%- macro reg_enum(o, scope = 'types.ns') ~%} { - var en = new EnumSymbol(new Origin(), "{{o.name|ns_last}}"); + var en = new EnumSymbolNative(new Origin(), "{{o.name|ns_last}}" +#if !BHL_FRONT + , typeof({{o.name}}) +#else + , null +#endif + ); {{scope}}.{{o.name|ns_prefix}}Define(en);