nitlanguage
/
nit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
nitg: Modified compilation routine to avoid use of String contructors
[nit.git]
/
src
/
naive_interpreter.nit
diff --git
a/src/naive_interpreter.nit
b/src/naive_interpreter.nit
index
ba80cd9
..
7fdbf15
100644
(file)
--- a/
src/naive_interpreter.nit
+++ b/
src/naive_interpreter.nit
@@
-1401,10
+1401,7
@@
redef class AStringFormExpr
do
var txt = self.value.as(not null)
var nat = v.native_string_instance(txt)
do
var txt = self.value.as(not null)
var nat = v.native_string_instance(txt)
- var res = new MutableInstance(v.mainmodule.get_primitive_class("String").mclass_type)
- v.init_instance(res)
- v.send(v.force_get_primitive_method("from_cstring", res.mtype), [res, nat])
- v.check_init_instance(res)
+ var res = v.send(v.force_get_primitive_method("to_s", nat.mtype), [nat]).as(not null)
return res
end
end
return res
end
end