Explorar o código

Do not generate scriptable glue for callable variables. Closes https://github.com/HaxeFoundation/hxcpp/issues/573

Hugh %!s(int64=8) %!d(string=hai) anos
pai
achega
b3b4e27ab6
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/generators/gencpp.ml

+ 1 - 1
src/generators/gencpp.ml

@@ -5846,7 +5846,7 @@ let generate_class_files baseCtx super_deps constructor_deps class_def inScripta
 
    let generate_script_function isStatic field scriptName callName =
       match follow field.cf_type  with
-      | TFun (args,return_type) ->
+      | TFun (args,return_type) when not (is_data_member field) ->
          output_cpp ("\nstatic void CPPIA_CALL " ^ scriptName ^ "(hx::CppiaCtx *ctx) {\n");
          let ret = script_signature return_type false in
          if (ret<>"v") then output_cpp ("ctx->return" ^ (script_type return_type false) ^ "(");