nitlanguage
/
nit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3a847ab
)
compiler: Accepts `new` constructor on non pointer-based class (eg. NativeString)
author
Jean Privat
<jean@pryen.org>
Thu, 12 Jun 2014 14:16:57 +0000
(10:16 -0400)
committer
Jean Privat
<jean@pryen.org>
Thu, 12 Jun 2014 14:16:57 +0000
(10:16 -0400)
Just use with a placebo receiver like in other cases.
Signed-off-by: Jean Privat <jean@pryen.org>
src/abstract_compiler.nit
patch
|
blob
|
history
diff --git
a/src/abstract_compiler.nit
b/src/abstract_compiler.nit
index
8faa8c5
..
a453f6b
100644
(file)
--- a/
src/abstract_compiler.nit
+++ b/
src/abstract_compiler.nit
@@
-2621,8
+2621,7
@@
redef class ANewExpr
else if ctype == "void*" then
recv = v.new_expr("NULL/*special!*/", mtype)
else
- debug("cannot new {mtype}")
- abort
+ recv = v.new_expr("({ctype})0/*special!*/", mtype)
end
var args = [recv]
for a in self.n_args.n_exprs do