code: various update to clean declaration or usage of constructors
authorJean Privat <jean@pryen.org>
Tue, 8 Dec 2015 17:34:07 +0000 (12:34 -0500)
committerJean Privat <jean@pryen.org>
Tue, 8 Dec 2015 19:33:43 +0000 (14:33 -0500)
Signed-off-by: Jean Privat <jean@pryen.org>

lib/geometry/boxes.nit
src/frontend/i18n_phase.nit
src/parser/parser_nodes.nit

index 0e2d4b5..6ecf483 100644 (file)
@@ -215,6 +215,8 @@ class Box3d[N: Numeric]
        #     assert box.right == 4 and box.top == 4
        init around(boxed: Boxed3d[N]...)
        do
+               super
+
                assert not boxed.is_empty
 
                var left: nullable N = null
index fac760c..0550caf 100644 (file)
@@ -58,7 +58,7 @@ private class I18NPhase
 
                var pot_path = locale_dir / module_name
                var arr = vi.strings.values.to_a
-               var po = new POFile.with_strings(arr)
+               var po = new POFile(arr)
                po.write_template(pot_path)
 
                if lang != null then
@@ -191,12 +191,6 @@ class POFile
        # Read from a PO file
        var strings: Array[PObject]
 
-       # Creates a PO file with strings built-in
-       init with_strings(sm: Array[PObject])do
-               strings = new Array[PObject].with_capacity(sm.length)
-               strings.add_all sm
-       end
-
        redef fun write_to_file(path) do
                if not path.has_suffix(".po") then path += ".po"
                super path
index df01109..472e289 100644 (file)
@@ -1126,7 +1126,7 @@ end
 class APublicVisibility
        super AVisibility
        # The `public` keyword, if any
-       var n_kwpublic: nullable TKwpublic is writable
+       var n_kwpublic: nullable TKwpublic = null is writable
 end
 # An explicit private visibility modifier
 class APrivateVisibility