deriving :: DeriveToS :: defaultinit
# Implementation of `to_s` for `Derivable` objects.
#
# The implementation uses `to_s` for each value of `attributes_to_map`.
#
# ~~~
# class A
# auto_derive
# super DeriveToS
# var an_int: Int
# var a_string: String
# end
#
# var a = new A(5, "five")
# assert a.to_s == "an_int:5; a_string:five"
# ~~~
#
# Warning: the method may go in an infinite recursion if there is a circuit in
# the implementation of `to_s`.
interface DeriveToS
super Derivable
redef fun to_s do return derive_to_map.join("; ", ":")
end
lib/deriving/deriving.nit:63,1--84,3