nitlanguage
/
nit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b699354
)
compiler: resolve types when doing new NativeArray
author
Jean Privat
<jean@pryen.org>
Wed, 19 Nov 2014 02:08:03 +0000
(21:08 -0500)
committer
Jean Privat
<jean@pryen.org>
Wed, 19 Nov 2014 02:08:03 +0000
(21:08 -0500)
Signed-off-by: Jean Privat <jean@pryen.org>
src/compiler/global_compiler.nit
patch
|
blob
|
history
diff --git
a/src/compiler/global_compiler.nit
b/src/compiler/global_compiler.nit
index
510b1ac
..
94dda37
100644
(file)
--- a/
src/compiler/global_compiler.nit
+++ b/
src/compiler/global_compiler.nit
@@
-396,6
+396,7
@@
class GlobalCompilerVisitor
redef fun native_array_instance(elttype: MType, length: RuntimeVariable): RuntimeVariable
do
var ret_type = self.get_class("NativeArray").get_mtype([elttype])
+ ret_type = anchor(ret_type).as(MClassType)
return self.new_expr("NEW_{ret_type.c_name}({length})", ret_type)
end