contrib/objcwrapper: add the UIKit example
[nit.git] / contrib / refund / src / refund_base.nit
index fbd5fee..48e1833 100644 (file)
@@ -352,7 +352,7 @@ class UniqCare
        # * `max`: max amount refunded for this `Care` in a reclamation sheet.
        # * `month_max`: max amount refunded by month.
        init with_vals(id: Int, cover: Float, max, month_max: nullable Dollar) do
-               self.id = id
+               init(id)
                self.cover = cover
                self.max = max
                self.month_max = month_max
@@ -382,7 +382,7 @@ class RangeCare
        # * `max`: max amount refunded for this `Care` in a reclamation sheet.
        # * `month_max`: max amount refunded by month.
        init with_vals(id: Range[Int], cover: Float, max, month_max: nullable Dollar) do
-               self.id = id
+               init(id)
                self.cover = cover
                self.max = max
                self.month_max = month_max
@@ -402,7 +402,7 @@ class Dollar
 
        # Inits `self` from a float `value`.
        init from_float(value: Float) do
-               self.value = (value * 100.0).to_i
+               init((value * 100.0).to_i)
        end
 
        redef fun to_s do return "{value / 100}.{value % 100}$"