Merge: introduce plain_to_s
authorJean Privat <jean@pryen.org>
Fri, 29 May 2015 01:49:02 +0000 (21:49 -0400)
committerJean Privat <jean@pryen.org>
Fri, 29 May 2015 01:49:02 +0000 (21:49 -0400)
In order to have a more POLA `to_s` on collections, it is required that a new method with the old behavior is provided for clients that need it (especially the interpreter that use it for superstrings).

the compiler use `native_to_s` for superstrings but `c_src/nitg` still use `to_s` on array, so a regeneration of the bootstrap is required before changing the behavior of `to_s` on collections.

Pull-Request: #1385
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>
Reviewed-by: Alexandre Blondin Massé <alexandre.blondin.masse@gmail.com>
Reviewed-by: Romain Chanoir <chanoir.romain@courrier.uqam.ca>
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>

1  2 
lib/standard/file.nit
lib/standard/string.nit
tests/sav/nitserial_args1.res

Simple merge
Simple merge
@@@ -9,10 -9,12 +9,10 @@@ redef class Deserialize
        redef fun deserialize_class(name)
        do
                # Module: test_serialization
-               if name == "Array[Object]" then return new Array[Object].from_deserializer(self)
+               if name == "Array[String]" then return new Array[String].from_deserializer(self)
                if name == "Array[nullable Object]" then return new Array[nullable Object].from_deserializer(self)
                if name == "Array[Serializable]" then return new Array[Serializable].from_deserializer(self)
-               if name == "Array[String]" then return new Array[String].from_deserializer(self)
+               if name == "Array[Object]" then return new Array[Object].from_deserializer(self)
 -              if name == "HashMap[Serializable, Array[Couple[Serializable, Int]]]" then return new HashMap[Serializable, Array[Couple[Serializable, Int]]].from_deserializer(self)
 -              if name == "Array[Couple[Serializable, Int]]" then return new Array[Couple[Serializable, Int]].from_deserializer(self)
                return super
        end
  end