lib/standard/string: introduce (an use) `plain_to_s`
[nit.git] / src / interpreter / naive_interpreter.nit
index c1bd59b..9708f3f 100644 (file)
@@ -402,6 +402,8 @@ class NaiveInterpreter
                        var param = msignature.mparameters[i]
                        var j = map.map.get_or_null(i)
                        if j == null then
+                               # default value
+                               res.add(null_instance)
                                continue
                        end
                        if param.is_vararg and map.vararg_decl > 0 then
@@ -1627,7 +1629,7 @@ redef class ASuperstringExpr
                        array.add(i)
                end
                var i = v.array_instance(array, v.mainmodule.object_type)
-               var res = v.send(v.force_get_primitive_method("to_s", i.mtype), [i])
+               var res = v.send(v.force_get_primitive_method("plain_to_s", i.mtype), [i])
                assert res != null
                return res
        end
@@ -1895,6 +1897,13 @@ redef class AVarargExpr
        end
 end
 
+redef class ANamedargExpr
+       redef fun expr(v)
+       do
+               return v.expr(self.n_expr)
+       end
+end
+
 redef class ADebugTypeExpr
        redef fun stmt(v)
        do