nitce: do not forgot to autoadapt in native_array_instance
authorJean Privat <jean@pryen.org>
Fri, 8 Jun 2018 15:42:23 +0000 (11:42 -0400)
committerJean Privat <jean@pryen.org>
Fri, 8 Jun 2018 15:42:23 +0000 (11:42 -0400)
Signed-off-by: Jean Privat <jean@pryen.org>

src/compiler/separate_erasure_compiler.nit

index 244a9ed..511cb75 100644 (file)
@@ -654,6 +654,7 @@ class SeparateErasureCompilerVisitor
                var res = self.new_var(mtype)
                res.is_exact = true
                self.require_declaration("NEW_{nclass.c_name}")
+               length = autobox(length, compiler.mainmodule.int_type)
                self.add("{res} = NEW_{nclass.c_name}({length});")
                return res
        end