lib: prepare for new init
authorJean Privat <jean@pryen.org>
Tue, 13 May 2014 09:23:49 +0000 (05:23 -0400)
committerJean Privat <jean@pryen.org>
Tue, 13 May 2014 10:06:23 +0000 (06:06 -0400)
Give some default values on nullable attributes so they will not be
collected.

Signed-off-by: Jean Privat <jean@pryen.org>

lib/nitcc_runtime.nit
lib/standard/ropes.nit

index 3e77c20..51ee0c8 100644 (file)
@@ -473,8 +473,9 @@ end
 # A parser error linked to a unexpected token
 class NParserError
        super NError
+
        # The unexpected token
-       var token: nullable NToken
+       var token: nullable NToken = null
 
        redef fun unexpected
        do
index ad093ae..8d507a1 100644 (file)
@@ -967,8 +967,8 @@ end
 private class ConcatNode
        super RopeNode
 
-       private var _left_child: nullable RopeNode
-       private var _right_child: nullable RopeNode
+       private var _left_child: nullable RopeNode = null
+       private var _right_child: nullable RopeNode = null
 
        private fun left_child: nullable RopeNode
        do