src: transform all old writable in annotations
[nit.git] / lib / trees / abstract_tree.nit
index 63ac67a..d05663e 100644 (file)
@@ -28,7 +28,7 @@ abstract class TreeMap[K: Comparable, E]
        protected type N: TreeNode[K, E]
 
        # The `root` node of the tree (null if tree is empty)
-       protected var root: nullable N protected writable = null
+       protected var root: nullable N = null is protected writable
 
        # Display the tree in a gaphical windows
        # Graphviz with a working -Txlib is expected
@@ -51,9 +51,9 @@ class TreeNode[K: Comparable, E]
        var value: E
 
        # Direct parent of this node (null if the node is root)
-       var parent: nullable SELF writable = null
+       var parent: nullable SELF = null is writable
 
-       redef fun to_s do return "\{{value}\}"
+       redef fun to_s do return "\{{value or else ""}\}"
 
        # Return dot representation of this node
        # Used for debugging by `AbstractTree::show_dot`