diff --git a/src/generators/cpp/cppRetyper.ml b/src/generators/cpp/cppRetyper.ml index 856c47c397d..7cec41def07 100644 --- a/src/generators/cpp/cppRetyper.ml +++ b/src/generators/cpp/cppRetyper.ml @@ -832,6 +832,7 @@ let expression ctx request_type function_args function_type expression_tree forI (retyper_ctx, CppCall (func, retypedArgs), return_type) | CppFunction ( (FuncInstance (_, _, { cf_type = TFun (arg_types, _) }) as func), returnType ) | CppFunction ( (FuncStatic (_, _, { cf_type = TFun (arg_types, _) }) as func), returnType ) + | CppFunction ( (FuncSuper (_, _, { cf_type = TFun (arg_types, _) }) as func), returnType ) | CppFunction ( (FuncThis ({ cf_type = TFun (arg_types, _) }, _) as func), returnType ) -> let arg_types = List.map diff --git a/tests/misc/cppia/projects/Issue9990/Main.hx b/tests/misc/cppia/projects/Issue9990/Main.hx new file mode 100644 index 00000000000..cfef6a7d76b --- /dev/null +++ b/tests/misc/cppia/projects/Issue9990/Main.hx @@ -0,0 +1,23 @@ +// template function converts to dynamic array +function wrap(a:Array):Array { + return a; +} + +class Parent { + function method(a:Array):Array { + return a.copy(); + } +} + +class Child extends Parent { + public function new() {} + + override public function method(a:Array):Array { + return super.method(wrap(a)); + } +} + +function main() { + var c = new Child(); + c.method([7, 8, 9]); +} diff --git a/tests/misc/cppia/projects/Issue9990/compile.hxml b/tests/misc/cppia/projects/Issue9990/compile.hxml new file mode 100644 index 00000000000..7312da6dbc8 --- /dev/null +++ b/tests/misc/cppia/projects/Issue9990/compile.hxml @@ -0,0 +1,3 @@ +--main Main +--cppia bin/script.cppia +--cmd haxelib run hxcpp bin/script.cppia diff --git a/tests/misc/cppia/run.hxml b/tests/misc/cppia/run.hxml new file mode 100644 index 00000000000..ddd91b1b97c --- /dev/null +++ b/tests/misc/cppia/run.hxml @@ -0,0 +1,2 @@ +-cp ../src +--run Main diff --git a/tests/runci/targets/Cpp.hx b/tests/runci/targets/Cpp.hx index 9bf4ff2ca0b..f1954614c6c 100644 --- a/tests/runci/targets/Cpp.hx +++ b/tests/runci/targets/Cpp.hx @@ -7,6 +7,7 @@ import runci.Config.*; class Cpp { static public var gotCppDependencies = false; static final miscCppDir = getMiscSubDir('cpp'); + static final miscCppiaDir = getMiscSubDir('cppia'); static public function getCppDependencies() { if (gotCppDependencies) return; @@ -99,5 +100,7 @@ class Cpp { changeDirectory(miscCppDir); runCommand("haxe", ["run.hxml"]); + changeDirectory(miscCppiaDir); + runCommand("haxe", ["run.hxml"]); } }