tests: remove remaining old-style attributes declarations
authorJean Privat <jean@pryen.org>
Tue, 15 Jul 2014 20:13:57 +0000 (16:13 -0400)
committerJean Privat <jean@pryen.org>
Thu, 17 Jul 2014 19:16:39 +0000 (15:16 -0400)
Signed-off-by: Jean Privat <jean@pryen.org>

61 files changed:
tests/base_as_notnull.nit
tests/base_attr.nit
tests/base_attr2.nit
tests/base_attr_init_val2.nit
tests/base_attr_isset.nit
tests/base_attr_nullable.nit
tests/base_attr_nullable_int.nit
tests/base_compile.nit
tests/base_gen2.nit
tests/base_nullable.nit
tests/base_primitive_null.nit
tests/base_var_null.nit
tests/base_var_type_evolution_null3.nit
tests/base_virtual_type_self.nit
tests/bench_complex_sort.nit
tests/bench_netsim.nit
tests/error_attr_2def.nit
tests/error_attr_assign.nit
tests/error_expr_not_ok.nit
tests/error_formal.nit
tests/error_kern_attr_any.nit
tests/error_kern_attr_int.nit
tests/error_ref_attr.nit
tests/error_spe_attr.nit
tests/example_beer.nit
tests/example_hanoi.nit
tests/example_objet.nit
tests/example_point.nit
tests/galerie.nit
tests/gccbug_attribute_access.nit
tests/module_simple.nit
tests/rterror_null_receiver.nit
tests/sav/base_attr5_alt17.res
tests/sav/base_attr_gen_alt1.res
tests/sav/error_attr_2def.res
tests/sav/error_expr_not_ok.res
tests/sav/error_expr_not_ok_alt2.res
tests/sav/error_expr_not_ok_alt3.res
tests/sav/error_expr_not_ok_alt4.res
tests/sav/error_expr_not_ok_alt5.res
tests/sav/error_expr_not_ok_alt6.res
tests/sav/error_formal.res
tests/sav/error_kern_attr_any.res
tests/sav/error_kern_attr_int.res
tests/sav/error_ref_attr.res
tests/sav/error_spe_attr.res
tests/sav/niti/base_attr_init_val_raf_alt1.res
tests/sav/niti/rterror_attr_def_alt2.res
tests/sav/niti/rterror_attr_def_alt7.res
tests/sav/nitlight_args1.res
tests/sav/nitmetrics_args1.res
tests/sav/rterror_attr_def_alt2.res
tests/sav/rterror_attr_def_alt7.res
tests/sav/test_variance_attr.res
tests/shootout_binarytrees.nit
tests/test_create.nit
tests/test_create_more.nit
tests/test_gen.nit
tests/test_operator_brackets.nit
tests/test_paire.nit
tests/test_variance_attr.nit

index 5ab6412..ecd5018 100644 (file)
@@ -17,7 +17,7 @@
 import kernel
 
 class A
-       var _i: Int
+       var i: Int
        redef fun output do _i.output
        init(i: Int) do _i = i
 end
index 5c81c2b..4daed95 100644 (file)
@@ -24,8 +24,8 @@ class Int
 end
 
 class Foo
-       var _a1: Int
-       var _a2: Int
+       var a1: Int
+       var a2: Int
        fun run
        do
                _a1.output
@@ -41,7 +41,7 @@ end
 
 class Bar
        super Foo
-       var _a3: Int
+       var a3: Int
        redef fun run
        do
                _a1.output
index df439a1..204b0c9 100644 (file)
@@ -31,7 +31,7 @@ class A
        protected var a11: Object private writable = self
        private var a12: Object private writable = self
 
-       var _cpt: Int = 0
+       var cpt: Int = 0
 
        redef fun output
        do
index 9ed6c10..cbddbb7 100644 (file)
@@ -20,5 +20,5 @@ end
 class Int
 end
 class A
-       var _i: Int = 1
+       var i: Int = 1
 end
index f3a1178..5fc7e11 100644 (file)
@@ -29,14 +29,14 @@ enum Bool
 end
 
 class Integer
-       var _val: Int
+       var val: Int
        init(val: Int) do _val = val
        fun output do _val.output
 end
 
 class Foo
-       var _a1: Integer
-       var _a2: Integer
+       var a1: Integer
+       var a2: Integer
        fun run
        do
                _a1.output
@@ -64,9 +64,9 @@ end
 
 class Bar
        super Foo
-       var _a3: Integer#alt1# #alt2#
-       #alt1#var _a3: Integer = new Integer(9000)
-       #alt2#var _a3: nullable Integer
+       var a3: Integer#alt1# #alt2#
+       #alt1#var a3: Integer = new Integer(9000)
+       #alt2#var a3: nullable Integer
        redef fun run
        do
                _a1.output
index 08ad503..1d0ddab 100644 (file)
@@ -25,14 +25,14 @@ enum Int
 end
 
 class Integer
-       var _val: Int
+       var val: Int
        init(val: Int) do _val = val
        fun output do _val.output
 end
 
 class Foo
-       var _a1: Integer
-       var _a2: Integer
+       var a1: Integer
+       var a2: Integer
        fun run
        do
                _a1.output
@@ -58,7 +58,7 @@ end
 
 class Bar
        super Foo
-       var _a3: Integer
+       var a3: Integer
        redef fun run
        do
                _a1.output
index 063dd14..3276d2c 100644 (file)
@@ -25,8 +25,8 @@ enum Int
 end
 
 class Foo
-       var _a1: Int
-       var _a2: Int
+       var a1: Int
+       var a2: Int
        fun run
        do
                _a1.output
@@ -52,7 +52,7 @@ end
 
 class Bar
        super Foo
-       var _a3: Int
+       var a3: Int
        redef fun run
        do
                _a1.output
index cd9061c..aa0efd2 100644 (file)
@@ -17,7 +17,7 @@
 import kernel
 
 class Client
-       var _budjet: Int # 
+       var budjet: Int #
        fun regarde(t: Tableau)
        do
                if t.joli and dans_mes_moyens(t.etiquette.prix) then
index f709c37..263d706 100644 (file)
@@ -30,7 +30,7 @@ end
 
 class B[E]
        redef fun output do _e.output
-       var _e: E
+       var e: E
        init(e: E) do _e = e
 end
 
@@ -40,8 +40,8 @@ class C[F, G]
                _f.output
                _g.output
        end
-       var _f: F
-       var _g: G
+       var f: F
+       var g: G
        init(f: F, g: G)
        do
                _f = f
index fe19a24..078421c 100644 (file)
@@ -17,7 +17,7 @@
 import kernel
 
 class A
-       var _i: Int
+       var i: Int
        init (i: Int) do _i = i
        redef fun output do _i.output
 end
index 4ab32bd..2ba5388 100644 (file)
@@ -17,9 +17,9 @@
 import kernel
 
 class A
-       var _i: nullable Int = null
-       var _b: nullable Bool = null
-       var _c: nullable Char = null
+       var i: nullable Int = null
+       var b: nullable Bool = null
+       var c: nullable Char = null
 
        init
        do
index c0cb189..1161192 100644 (file)
@@ -17,7 +17,7 @@
 import kernel
 
 class A
-       var _foo: Int = 1
+       var foo: Int = 1
        fun +(i: Int): A do return new A
        redef fun output do 1.output
 end
index 972b2e5..22b36aa 100644 (file)
@@ -17,7 +17,7 @@
 import kernel
 
 class G[A: nullable Object]
-       var _a: A
+       var a: A
        init (a: A) do _a = a
 
        fun run
index 964fc39..e599f1b 100644 (file)
@@ -18,7 +18,7 @@ import kernel
 
 class A[E]
        type T: E
-       var _t: T
+       var t: T
        fun foo(t: T) do end
        fun foo2: T do return _t
        fun bar(t: A[T]) do end
index 0ead451..116d7d7 100644 (file)
@@ -22,7 +22,7 @@ end
 
 class A
        super Elt
-       var _a: Int
+       var a: Int
        redef fun val1: Int do return _a
 
        init(i: Int) do _a = i
@@ -30,7 +30,7 @@ end
 
 class Elt2
        super Elt
-       var _b: Int
+       var b: Int
        redef fun val1: Int do return _b/2
        redef fun val2: Int do return _b
        init initelt2(i: Int) do _b = i
@@ -43,8 +43,8 @@ end
 
 class C
        super Elt
-       var _c: Int
-       var _d: Int
+       var c: Int
+       var d: Int
        redef fun val1: Int do return _c end
        redef fun val2: Int do return _d end
 
@@ -89,7 +89,7 @@ class EltComparator
                _is_val1 = not _is_val1
        end
        
-       var _is_val1: Bool = false
+       var is_val1: Bool = false
 
        init do end
 end
index ae42bee..accbb45 100644 (file)
@@ -19,7 +19,7 @@ class Node
        do
                return _name
        end
-       var _name: String = "noname"
+       var name: String = "noname"
 end
 
 class WakeUpNode
@@ -31,13 +31,13 @@ class WakeUpNode
        do
                _scheduler.add_event(self, d)
        end
-       var _scheduler: Scheduler
+       var scheduler: Scheduler
        init do end
 end
 
 class NodeSource
        super Node
-       var _nexts: nullable ArraySet[NodeSink] = null
+       var nexts: nullable ArraySet[NodeSink] = null
        fun attach(n: NodeSink)
        # Add the sink `n' the the connected nodes
        # Do nothing if `n' is already connected
@@ -77,8 +77,8 @@ end
 #
 
 class Scheduler
-       var _time_list: Array[Couple[Int, WakeUpNode]] = new Array[Couple[Int, WakeUpNode]]
-       var _time: Int = 0 # What time is it ?
+       var time_list: Array[Couple[Int, WakeUpNode]] = new Array[Couple[Int, WakeUpNode]]
+       var time: Int = 0 # What time is it ?
        fun add_event(n: WakeUpNode, d: Int)
        # The node `n' whant to be weaked up in `d' time units
        do
@@ -137,7 +137,7 @@ class BeepSource
                send
                wake_up_in(_delay)
        end
-       var _delay: Int
+       var delay: Int
        fun start
        do
                wake_up_in(_delay)
@@ -172,7 +172,7 @@ end
 class NodeAlternate
        super NodeSink
        super NodeSource
-       var _last: nullable NodeSource
+       var last: nullable NodeSource
        redef fun recieve(n: NodeSource)
        do
                if n != _last then
@@ -190,7 +190,7 @@ end
 class NodeEat
        super CountSink
        super NodeSource
-       var _limit: Int
+       var limit: Int
        redef fun recieve(n: NodeSource)
        do
                var c = count + 1
@@ -213,7 +213,7 @@ class NodeDelay
        super NodeSource
        super NodeSink
        super WakeUpNode
-       var _delay: Int
+       var delay: Int
        redef fun recieve(n: NodeSource)
        do
                wake_up_in(_delay)
index 497cd8e..e10ed39 100644 (file)
@@ -15,6 +15,6 @@
 # limitations under the License.
 
 class A
-       var _toto: Int
-       var _toto: Object
+       var toto: Int
+       var toto: Object
 end
index ba807d1..173d9b5 100644 (file)
@@ -15,7 +15,7 @@
 # limitations under the License.
 
 class A
-       var _toto: Int
+       var toto: Int
        fun m
        do
                _toto = 't'
index 0b25f5c..0e90f64 100644 (file)
@@ -16,8 +16,8 @@
 
 
 class A
-       var _x: Object = fail
-       var _i: Int = 1
+       var x: Object = fail
+       var i: Int = 1
        fun y do fail
        fun z: Object do return fail
        fun t do
index b8555d3..13a16b5 100644 (file)
@@ -15,5 +15,5 @@
 # limitations under the License.
 
 class A[T]
-       var _k: T[Int]
+       var k: T[Int]
 end
index 8146788..e45209c 100644 (file)
@@ -15,5 +15,5 @@
 # limitations under the License.
 
 redef class Object
-       var _toto: Bool
+       var toto: Bool
 end
index 5140f70..5a0ea55 100644 (file)
@@ -15,5 +15,5 @@
 # limitations under the License.
 
 redef class Int
-       var _toto: Object
+       var toto: Object
 end
index dbee0ba..3022e6d 100644 (file)
@@ -17,5 +17,5 @@
 import module_simple
 
 redef class C
-       redef var _a: Int
+       redef var a: Int
 end
index e589ec7..5570921 100644 (file)
@@ -15,9 +15,9 @@
 # limitations under the License.
 
 class A
-       var _a: Int = 1
+       var a: Int = 1
 end
 class B
        super A
-       redef var _a: Object = 2
+       redef var a: Object = 2
 end
index 3b3744d..3d99198 100644 (file)
@@ -79,7 +79,7 @@ class Bottles
                _quantity = i
        end
 
-       var _quantity: Int
+       var quantity: Int
 end
 
 var i = 99
index ee46d40..da0cf31 100644 (file)
@@ -53,7 +53,7 @@ class Tower
                end
        end
 
-       var _t: Array[Int] # The stack of discus (only the diameter is stored).
+       var t: Array[Int] # The stack of discus (only the diameter is stored).
 
        init full(n: Int)
        # Build a new tower with `n' discus.
@@ -95,9 +95,9 @@ class Hanoi
                return "{_tower1} {_tower2} {_tower3}"
        end
 
-       var _tower1: Tower
-       var _tower2: Tower
-       var _tower3: Tower
+       var tower1: Tower
+       var tower2: Tower
+       var tower3: Tower
 
        init(nb: Int)
        do
index a0f69d6..f5aaf0d 100644 (file)
@@ -62,8 +62,8 @@ private
 # receveur ("self")
 
 # Les attributs sont déclarés par le mot clé "fun" et commencent par un "@"
-       var _nom_: String               # Un entrepôt a un nom (de type chaîne).
-       var _rayons: Array[Rayon]       # Il est composé d'un ensemble de rayon.
+       var nom_: String                # Un entrepôt a un nom (de type chaîne).
+       var rayons: Array[Rayon]        # Il est composé d'un ensemble de rayon.
        # "Array" est une classe paramétrée, les crochets en sont la marque.
        # La classe "Rayon" est définie plus loin
 
@@ -156,8 +156,8 @@ end
 
 class Produit
 private
-       var _nom_: String               # Désignation du produit
-       var _qte_: Int                  # Quantité en stock
+       var nom_: String                # Désignation du produit
+       var qte_: Int                   # Quantité en stock
 
 
 
@@ -208,8 +208,8 @@ end
 
 class Rayon
 private
-       var _stock: Array[Produit]              # Des produits en stock
-       var _rubrique: String                   # La catégorie des produits stockés
+       var stock: Array[Produit]               # Des produits en stock
+       var rubrique: String                    # La catégorie des produits stockés
 
        # Cette fonction est utilisé par to_s pour afficher un petit titre
        fun to_s_head: String
@@ -326,7 +326,7 @@ class RayonFroid
                return _temp_max_       # Attribut défini juste en dessous
        end
 
-       var _temp_max_: Int             # Une température maximale
+       var temp_max_: Int              # Une température maximale
        # Les autres attributs sont bien sûr hérités !
 
        redef fun to_s_head: String             # On redéfinit cette méthode
index 8a568f6..2ad57c5 100644 (file)
 
 class Point
 private
-       var _x: Int     # Abscisse
-       var _y: Int     # Ordonnée
-
-
-       fun x: Int
-       do
-               return _x
-       end
-       fun x=(i: Int)
-       do
-               _x = i
-       end
-
-       fun y: Int
-       do
-               return _y
-       end
-       fun y=(i: Int)
-       do
-               _y = i
-       end
+       var x: Int      # Abscisse
+       var y: Int      # Ordonnée
 
        # Change la position d'un point
        fun moveto(x: Int, y: Int)
index 9260d19..3cbaa2b 100644 (file)
@@ -19,7 +19,7 @@
 import kernel
 
 class Client
-       var _credit: Int
+       var credit: Int
        
        fun regarde(t: Tableau)
        do
index d595cdf..07f389a 100644 (file)
@@ -21,7 +21,7 @@
 # * try to change the optimization flags
 # * try to update your gcc version
 class Foo
-       var _count: Int = 0
+       var count: Int = 0
        fun run: Int
        do
                # Under some case gcc produce bad code here and make the if
index ba9dc49..c56e2dd 100644 (file)
@@ -28,5 +28,5 @@ class C
        super B
        fun r(x: B) do end
        fun s: B do return self end
-       var _a: B
+       var a: B
 end
index c38c385..7c8bd9c 100644 (file)
@@ -17,7 +17,7 @@
 import kernel
 class A
        var foo: Int = 1
-       var _foo: Int = 2
+       var bar: Int = 2
 end
 
 var a: nullable A = null
@@ -26,6 +26,6 @@ var a: nullable A = null
 #alt1#a.foo.output
 #alt2#a.foo = 1
 #alt3#a.foo += 1
-#alt4#a._foo.output
-#alt5#a._foo = 10
-#alt6#a._foo += 10
+#alt4#a._bar.output
+#alt5#a._bar = 10
+#alt6#a._bar += 10
index d3b9452..03ea677 100644 (file)
@@ -1,2 +1,2 @@
 alt/base_attr5_alt17.nit:47,12--14: Error: No property B::bar is inherited. Remove the redef keyword to define a new property.
-alt/base_attr5_alt17.nit:47,12--14: Error: Untyped attribute base_attr5_alt17#B#@bar
+alt/base_attr5_alt17.nit:47,12--14: Error: Untyped attribute base_attr5_alt17#B#_bar
index 84092c8..abedd5e 100644 (file)
@@ -1 +1 @@
-Runtime error: Uninitialized attribute @e (alt/base_attr_gen_alt1.nit:26)
+Runtime error: Uninitialized attribute _e (alt/base_attr_gen_alt1.nit:26)
index 0ee41fd..5cb4cca 100644 (file)
@@ -1 +1 @@
-error_attr_2def.nit:19,6--10: Error: A property _toto is already defined in class A at line 18.
+error_attr_2def.nit:19,6--9: Error: A property toto is already defined in class A at line 18.
index 033aaaa..e0e3b61 100644 (file)
@@ -1,4 +1,4 @@
-error_expr_not_ok.nit:19,19--22: Error: Method or variable 'fail' unknown in A.
+error_expr_not_ok.nit:19,18--21: Error: Method or variable 'fail' unknown in A.
 error_expr_not_ok.nit:21,11--14: Error: Method or variable 'fail' unknown in A.
 error_expr_not_ok.nit:22,26--29: Error: Method or variable 'fail' unknown in A.
 error_expr_not_ok.nit:24,8--11: Error: Method or variable 'fail' unknown in A.
index 2c60a13..b798295 100644 (file)
@@ -1,4 +1,4 @@
-alt/error_expr_not_ok_alt2.nit:19,19--22: Error: Method or variable 'fail' unknown in A.
+alt/error_expr_not_ok_alt2.nit:19,18--21: Error: Method or variable 'fail' unknown in A.
 alt/error_expr_not_ok_alt2.nit:21,11--14: Error: Method or variable 'fail' unknown in A.
 alt/error_expr_not_ok_alt2.nit:22,26--29: Error: Method or variable 'fail' unknown in A.
 alt/error_expr_not_ok_alt2.nit:24,8--11: Error: Method or variable 'fail' unknown in A.
index 7aaa75d..2da48e6 100644 (file)
@@ -1,4 +1,4 @@
-alt/error_expr_not_ok_alt3.nit:19,19--22: Error: Method or variable 'fail' unknown in A.
+alt/error_expr_not_ok_alt3.nit:19,18--21: Error: Method or variable 'fail' unknown in A.
 alt/error_expr_not_ok_alt3.nit:21,11--14: Error: Method or variable 'fail' unknown in A.
 alt/error_expr_not_ok_alt3.nit:22,26--29: Error: Method or variable 'fail' unknown in A.
 alt/error_expr_not_ok_alt3.nit:24,8--11: Error: Method or variable 'fail' unknown in A.
index 3919001..ad06d43 100644 (file)
@@ -1,4 +1,4 @@
-alt/error_expr_not_ok_alt4.nit:19,19--22: Error: Method or variable 'fail' unknown in A.
+alt/error_expr_not_ok_alt4.nit:19,18--21: Error: Method or variable 'fail' unknown in A.
 alt/error_expr_not_ok_alt4.nit:21,11--14: Error: Method or variable 'fail' unknown in A.
 alt/error_expr_not_ok_alt4.nit:22,26--29: Error: Method or variable 'fail' unknown in A.
 alt/error_expr_not_ok_alt4.nit:24,8--11: Error: Method or variable 'fail' unknown in A.
index d9dd373..5a9cc45 100644 (file)
@@ -1,4 +1,4 @@
-alt/error_expr_not_ok_alt5.nit:19,19--22: Error: Method or variable 'fail' unknown in A.
+alt/error_expr_not_ok_alt5.nit:19,18--21: Error: Method or variable 'fail' unknown in A.
 alt/error_expr_not_ok_alt5.nit:21,11--14: Error: Method or variable 'fail' unknown in A.
 alt/error_expr_not_ok_alt5.nit:22,26--29: Error: Method or variable 'fail' unknown in A.
 alt/error_expr_not_ok_alt5.nit:24,8--11: Error: Method or variable 'fail' unknown in A.
index 212ed6f..3d37819 100644 (file)
@@ -1,4 +1,4 @@
-alt/error_expr_not_ok_alt6.nit:19,19--22: Error: Method or variable 'fail' unknown in A.
+alt/error_expr_not_ok_alt6.nit:19,18--21: Error: Method or variable 'fail' unknown in A.
 alt/error_expr_not_ok_alt6.nit:21,11--14: Error: Method or variable 'fail' unknown in A.
 alt/error_expr_not_ok_alt6.nit:22,26--29: Error: Method or variable 'fail' unknown in A.
 alt/error_expr_not_ok_alt6.nit:24,8--11: Error: Method or variable 'fail' unknown in A.
index 364b57b..91cbe5e 100644 (file)
@@ -1 +1 @@
-error_formal.nit:18,10--14: Type error: formal type T cannot have formal parameters.
+error_formal.nit:18,9--13: Type error: formal type T cannot have formal parameters.
index b2cd1ac..5c7b1a6 100644 (file)
@@ -1 +1 @@
-error_kern_attr_any.nit:18,6--10: Error: Attempt to define attribute _toto in the interface Object.
+error_kern_attr_any.nit:18,6--9: Error: Attempt to define attribute toto in the interface Object.
index 9043452..f870a60 100644 (file)
@@ -1 +1 @@
-error_kern_attr_int.nit:18,6--10: Error: Attempt to define attribute _toto in the interface Int.
+error_kern_attr_int.nit:18,6--9: Error: Attempt to define attribute toto in the interface Int.
index e683282..3ff4b7d 100644 (file)
@@ -1 +1 @@
-error_ref_attr.nit:20,16--18: Redef Error: Wrong static type. found Int, expected B.
+error_ref_attr.nit:20,15--17: Redef Error: Wrong return type. found Int, expected B.
index c300561..6f78128 100644 (file)
@@ -1 +1,2 @@
-error_spe_attr.nit:22,16--21: Redef Error: Wrong static type. found Object, expected Int.
+error_spe_attr.nit:22,15--20: Redef Error: Wrong return type. found Object, expected Int.
+error_spe_attr.nit:22,15--20: Redef Error: Wrong type for parameter `a'. found Object, expected Int.
index 865f879..e9a2a27 100644 (file)
@@ -1,3 +1,3 @@
-Runtime error: Uninitialized attribute @j (alt/base_attr_init_val_raf_alt1.nit:24)
+Runtime error: Uninitialized attribute _j (alt/base_attr_init_val_raf_alt1.nit:24)
 1
 1
index dbd5b3f..69408b6 100644 (file)
@@ -1 +1 @@
-Runtime error: Uninitialized attribute @a (alt/rterror_attr_def_alt2.nit:26)
+Runtime error: Uninitialized attribute _a (alt/rterror_attr_def_alt2.nit:26)
index 4d56903..ca215fe 100644 (file)
@@ -1,2 +1,2 @@
-Runtime error: Uninitialized attribute @a (alt/rterror_attr_def_alt7.nit:49)
+Runtime error: Uninitialized attribute _a (alt/rterror_attr_def_alt7.nit:49)
 c
index f14eb40..6a4d282 100644 (file)
@@ -32,7 +32,7 @@
 </span></span><span class="line" id="L32"><span class="nc_k">end</span>
 </span></span><span class="line" id="L33">
 </span><span class="nc_cdef foldable" id="base_simple3#B"><span class="line" id="L34"><span class="nc_k">class</span> <span class="nc_def nc_t popupable" title="class B" data-title="&lt;a href=&quot;base_simple3.html#base_simple3#B&quot;&gt;class B&lt;/a&gt;" data-content="&lt;div&gt;&lt;b&gt;class&lt;/b&gt; &lt;span&gt;B&lt;/span&gt;&lt;br/&gt;&lt;div class=&quot;dropdown&quot;&gt; &lt;a data-toggle=&quot;dropdown&quot; href=&quot;#&quot;&gt;&lt;b&gt;hier&lt;/b&gt; super-classes&lt;span class=&quot;caret&quot;&gt;&lt;/span&gt;&lt;/a&gt;&lt;ul class=&quot;dropdown-menu&quot; role=&quot;menu&quot; aria-labelledby=&quot;dLabel&quot;&gt;&lt;li&gt;&lt;a href=&quot;base_simple3.html#base_simple3#Object&quot;&gt;Object&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;" data-toggle="popover">B</span>
-</span><span class="nc_pdef foldable" id="base_simple3#B#@val"><a id="base_simple3#B#val"></a><a id="base_simple3#B#val="></a><span class="line" id="L35">     <span class="nc_k">var</span> <span class="nc_def nc_i popupable" title="base_simple3#B#val" data-title="&lt;a href=&quot;base_simple3.html#base_simple3#B#val&quot;&gt;base_simple3#B#val&lt;/a&gt;" data-content="&lt;div&gt;&lt;b&gt;fun&lt;/b&gt; &lt;span&gt;val&lt;span&gt;: &lt;a href=&quot;base_simple3.html#base_simple3#Int&quot;&gt;Int&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;br/&gt;&lt;/div&gt;" data-toggle="popover">val</span><span>:</span> <span class="nc_t popupable" title="Int" data-title="&lt;a href=&quot;base_simple3.html#base_simple3#Int&quot;&gt;Int&lt;/a&gt;" data-content="&lt;div&gt;&lt;b&gt;class&lt;/b&gt; &lt;span&gt;&lt;a href=&quot;base_simple3.html#base_simple3#Int&quot;&gt;Int&lt;/a&gt;&lt;/span&gt;&lt;br/&gt;&lt;/div&gt;" data-toggle="popover">Int</span>
+</span><span class="nc_pdef foldable" id="base_simple3#B#_val"><a id="base_simple3#B#val"></a><a id="base_simple3#B#val="></a><span class="line" id="L35">     <span class="nc_k">var</span> <span class="nc_def nc_i popupable" title="base_simple3#B#val" data-title="&lt;a href=&quot;base_simple3.html#base_simple3#B#val&quot;&gt;base_simple3#B#val&lt;/a&gt;" data-content="&lt;div&gt;&lt;b&gt;fun&lt;/b&gt; &lt;span&gt;val&lt;span&gt;: &lt;a href=&quot;base_simple3.html#base_simple3#Int&quot;&gt;Int&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;br/&gt;&lt;/div&gt;" data-toggle="popover">val</span><span>:</span> <span class="nc_t popupable" title="Int" data-title="&lt;a href=&quot;base_simple3.html#base_simple3#Int&quot;&gt;Int&lt;/a&gt;" data-content="&lt;div&gt;&lt;b&gt;class&lt;/b&gt; &lt;span&gt;&lt;a href=&quot;base_simple3.html#base_simple3#Int&quot;&gt;Int&lt;/a&gt;&lt;/span&gt;&lt;br/&gt;&lt;/div&gt;" data-toggle="popover">Int</span>
 </span></span><span class="nc_pdef foldable" id="base_simple3#B#init"><span class="line" id="L36">     <span class="nc_k">init</span><span>(</span><span class="nc_v nc_i popupable" title="v: Int" data-content="&lt;div&gt;&lt;b&gt;local var&lt;/b&gt; &lt;span&gt;v:&lt;a href=&quot;base_simple3.html#base_simple3#Int&quot;&gt;Int&lt;/a&gt;&lt;/span&gt;&lt;br/&gt;&lt;/div&gt;" data-toggle="popover">v</span><span>:</span> <span class="nc_t popupable" title="Int" data-title="&lt;a href=&quot;base_simple3.html#base_simple3#Int&quot;&gt;Int&lt;/a&gt;" data-content="&lt;div&gt;&lt;b&gt;class&lt;/b&gt; &lt;span&gt;&lt;a href=&quot;base_simple3.html#base_simple3#Int&quot;&gt;Int&lt;/a&gt;&lt;/span&gt;&lt;br/&gt;&lt;/div&gt;" data-toggle="popover">Int</span><span>)</span>
 </span><span class="line" id="L37">    <span class="nc_k">do</span>
 </span><span class="line" id="L38">            <span class="nc_l popupable" title="Int" data-title="&lt;a href=&quot;base_simple3.html#base_simple3#Int&quot;&gt;Int&lt;/a&gt;" data-content="&lt;div&gt;&lt;b&gt;class&lt;/b&gt; &lt;span&gt;&lt;a href=&quot;base_simple3.html#base_simple3#Int&quot;&gt;Int&lt;/a&gt;&lt;/span&gt;&lt;br/&gt;&lt;/div&gt;" data-toggle="popover">7</span><span>.</span><span class="nc_i popupable" title="call base_simple3#Int#output" data-title="&lt;a href=&quot;base_simple3.html#base_simple3#Int#output&quot;&gt;call base_simple3#Int#output&lt;/a&gt;" data-content="&lt;div&gt;&lt;b&gt;call&lt;/b&gt; &lt;span&gt;&lt;a href=&quot;base_simple3.html#base_simple3#Int#output&quot;&gt;output&lt;/a&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br/&gt;&lt;/div&gt;" data-toggle="popover">output</span>
@@ -42,8 +42,8 @@
 </span></span><span class="line" id="L42"><span class="nc_k">end</span>
 </span></span><span class="line" id="L43">
 </span><span class="nc_cdef foldable" id="base_simple3#C"><span class="line" id="L44"><span class="nc_k">class</span> <span class="nc_def nc_t popupable" title="class C" data-title="&lt;a href=&quot;base_simple3.html#base_simple3#C&quot;&gt;class C&lt;/a&gt;" data-content="&lt;div&gt;&lt;b&gt;class&lt;/b&gt; &lt;span&gt;C&lt;/span&gt;&lt;br/&gt;&lt;div class=&quot;dropdown&quot;&gt; &lt;a data-toggle=&quot;dropdown&quot; href=&quot;#&quot;&gt;&lt;b&gt;hier&lt;/b&gt; super-classes&lt;span class=&quot;caret&quot;&gt;&lt;/span&gt;&lt;/a&gt;&lt;ul class=&quot;dropdown-menu&quot; role=&quot;menu&quot; aria-labelledby=&quot;dLabel&quot;&gt;&lt;li&gt;&lt;a href=&quot;base_simple3.html#base_simple3#Object&quot;&gt;Object&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;" data-toggle="popover">C</span>
-</span><span class="nc_pdef foldable" id="base_simple3#C#@val1"><a id="base_simple3#C#val1"></a><a id="base_simple3#C#val1="></a><span class="line" id="L45">  <span class="nc_k">var</span> <span class="nc_def nc_i popupable" title="base_simple3#C#val1" data-title="&lt;a href=&quot;base_simple3.html#base_simple3#C#val1&quot;&gt;base_simple3#C#val1&lt;/a&gt;" data-content="&lt;div&gt;&lt;b&gt;fun&lt;/b&gt; &lt;span&gt;val1&lt;span&gt;: &lt;a href=&quot;base_simple3.html#base_simple3#Int&quot;&gt;Int&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;br/&gt;&lt;/div&gt;" data-toggle="popover">val1</span><span>:</span> <span class="nc_t popupable" title="Int" data-title="&lt;a href=&quot;base_simple3.html#base_simple3#Int&quot;&gt;Int&lt;/a&gt;" data-content="&lt;div&gt;&lt;b&gt;class&lt;/b&gt; &lt;span&gt;&lt;a href=&quot;base_simple3.html#base_simple3#Int&quot;&gt;Int&lt;/a&gt;&lt;/span&gt;&lt;br/&gt;&lt;/div&gt;" data-toggle="popover">Int</span>
-</span></span><span class="nc_pdef foldable" id="base_simple3#C#@val2"><a id="base_simple3#C#val2"></a><a id="base_simple3#C#val2="></a><span class="line" id="L46">   <span class="nc_k">var</span> <span class="nc_def nc_i popupable" title="base_simple3#C#val2" data-title="&lt;a href=&quot;base_simple3.html#base_simple3#C#val2&quot;&gt;base_simple3#C#val2&lt;/a&gt;" data-content="&lt;div&gt;&lt;b&gt;fun&lt;/b&gt; &lt;span&gt;val2&lt;span&gt;: &lt;a href=&quot;base_simple3.html#base_simple3#Int&quot;&gt;Int&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;br/&gt;&lt;/div&gt;" data-toggle="popover">val2</span><span>:</span> <span class="nc_t popupable" title="Int" data-title="&lt;a href=&quot;base_simple3.html#base_simple3#Int&quot;&gt;Int&lt;/a&gt;" data-content="&lt;div&gt;&lt;b&gt;class&lt;/b&gt; &lt;span&gt;&lt;a href=&quot;base_simple3.html#base_simple3#Int&quot;&gt;Int&lt;/a&gt;&lt;/span&gt;&lt;br/&gt;&lt;/div&gt;" data-toggle="popover">Int</span> <span>=</span> <span class="nc_l popupable" title="Int" data-title="&lt;a href=&quot;base_simple3.html#base_simple3#Int&quot;&gt;Int&lt;/a&gt;" data-content="&lt;div&gt;&lt;b&gt;class&lt;/b&gt; &lt;span&gt;&lt;a href=&quot;base_simple3.html#base_simple3#Int&quot;&gt;Int&lt;/a&gt;&lt;/span&gt;&lt;br/&gt;&lt;/div&gt;" data-toggle="popover">10</span>
+</span><span class="nc_pdef foldable" id="base_simple3#C#_val1"><a id="base_simple3#C#val1"></a><a id="base_simple3#C#val1="></a><span class="line" id="L45">  <span class="nc_k">var</span> <span class="nc_def nc_i popupable" title="base_simple3#C#val1" data-title="&lt;a href=&quot;base_simple3.html#base_simple3#C#val1&quot;&gt;base_simple3#C#val1&lt;/a&gt;" data-content="&lt;div&gt;&lt;b&gt;fun&lt;/b&gt; &lt;span&gt;val1&lt;span&gt;: &lt;a href=&quot;base_simple3.html#base_simple3#Int&quot;&gt;Int&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;br/&gt;&lt;/div&gt;" data-toggle="popover">val1</span><span>:</span> <span class="nc_t popupable" title="Int" data-title="&lt;a href=&quot;base_simple3.html#base_simple3#Int&quot;&gt;Int&lt;/a&gt;" data-content="&lt;div&gt;&lt;b&gt;class&lt;/b&gt; &lt;span&gt;&lt;a href=&quot;base_simple3.html#base_simple3#Int&quot;&gt;Int&lt;/a&gt;&lt;/span&gt;&lt;br/&gt;&lt;/div&gt;" data-toggle="popover">Int</span>
+</span></span><span class="nc_pdef foldable" id="base_simple3#C#_val2"><a id="base_simple3#C#val2"></a><a id="base_simple3#C#val2="></a><span class="line" id="L46">   <span class="nc_k">var</span> <span class="nc_def nc_i popupable" title="base_simple3#C#val2" data-title="&lt;a href=&quot;base_simple3.html#base_simple3#C#val2&quot;&gt;base_simple3#C#val2&lt;/a&gt;" data-content="&lt;div&gt;&lt;b&gt;fun&lt;/b&gt; &lt;span&gt;val2&lt;span&gt;: &lt;a href=&quot;base_simple3.html#base_simple3#Int&quot;&gt;Int&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;br/&gt;&lt;/div&gt;" data-toggle="popover">val2</span><span>:</span> <span class="nc_t popupable" title="Int" data-title="&lt;a href=&quot;base_simple3.html#base_simple3#Int&quot;&gt;Int&lt;/a&gt;" data-content="&lt;div&gt;&lt;b&gt;class&lt;/b&gt; &lt;span&gt;&lt;a href=&quot;base_simple3.html#base_simple3#Int&quot;&gt;Int&lt;/a&gt;&lt;/span&gt;&lt;br/&gt;&lt;/div&gt;" data-toggle="popover">Int</span> <span>=</span> <span class="nc_l popupable" title="Int" data-title="&lt;a href=&quot;base_simple3.html#base_simple3#Int&quot;&gt;Int&lt;/a&gt;" data-content="&lt;div&gt;&lt;b&gt;class&lt;/b&gt; &lt;span&gt;&lt;a href=&quot;base_simple3.html#base_simple3#Int&quot;&gt;Int&lt;/a&gt;&lt;/span&gt;&lt;br/&gt;&lt;/div&gt;" data-toggle="popover">10</span>
 </span></span><span class="line" id="L47"><span class="nc_k">end</span>
 </span></span><span class="line" id="L48">
 </span><span class="nc_pdef foldable" id="base_simple3#Object#foo"><span class="line" id="L49"><span class="nc_k">fun</span> <span class="nc_def popupable" title="base_simple3#Object#foo" data-title="&lt;a href=&quot;base_simple3.html#base_simple3#Object#foo&quot;&gt;base_simple3#Object#foo&lt;/a&gt;" data-content="&lt;div&gt;&lt;b&gt;fun&lt;/b&gt; &lt;span&gt;foo&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br/&gt;&lt;/div&gt;" data-toggle="popover"><span class="nc_i">foo</span></span> <span class="nc_k">do</span> <span class="nc_l popupable" title="Int" data-title="&lt;a href=&quot;base_simple3.html#base_simple3#Int&quot;&gt;Int&lt;/a&gt;" data-content="&lt;div&gt;&lt;b&gt;class&lt;/b&gt; &lt;span&gt;&lt;a href=&quot;base_simple3.html#base_simple3#Int&quot;&gt;Int&lt;/a&gt;&lt;/span&gt;&lt;br/&gt;&lt;/div&gt;" data-toggle="popover">2</span><span>.</span><span class="nc_i popupable" title="call base_simple3#Int#output" data-title="&lt;a href=&quot;base_simple3.html#base_simple3#Int#output&quot;&gt;call base_simple3#Int#output&lt;/a&gt;" data-content="&lt;div&gt;&lt;b&gt;call&lt;/b&gt; &lt;span&gt;&lt;a href=&quot;base_simple3.html#base_simple3#Int#output&quot;&gt;output&lt;/a&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br/&gt;&lt;/div&gt;" data-toggle="popover">output</span>
index 4540753..9dc118b 100644 (file)
          std: 0.926
          sum: 6
        cnbp: number of accessible properties (inherited + local)
-         avg: 4.0
-         max: C (8)
+         avg: 5.0
+         max: C (10)
          min: Object (3)
-         std: 2.0
-         sum: 34
+         std: 2.507
+         sum: 37
        cnba: number of accessible attributes (inherited + local)
          avg: 0.0
-         max: Object (0)
+         max: C (2)
          min: Object (0)
-         std: 0.0
-         sum: 0
+         std: 0.845
+         sum: 3
        cnbip: number of introduced properties
          avg: 2.0
-         max: C (5)
+         max: C (7)
          min: Bool (0)
-         std: 1.69
-         sum: 16
+         std: 2.42
+         sum: 19
        cnbrp: number of redefined properties
          avg: 0.0
          max: Object (0)
          sum: 6
        cnbp: number of accessible properties (inherited + local)
          avg: 4.0
-         max: C (8)
+         max: C (10)
          min: Object (1)
-         std: 2.151
-         sum: 35
+         std: 2.828
+         sum: 38
        cnba: number of accessible attributes (inherited + local)
          avg: 0.0
-         max: Object (0)
+         max: C (2)
          min: Object (0)
-         std: 0.0
-         sum: 0
+         std: 0.791
+         sum: 3
        cnbip: number of introduced properties
          avg: 2.0
-         max: C (5)
+         max: C (7)
          min: Bool (0)
-         std: 1.62
-         sum: 17
+         std: 2.291
+         sum: 20
        cnbrp: number of redefined properties
          avg: 0.0
          max: Object (0)
@@ -638,10 +638,10 @@ generating out/nitmetrics_args1.write/module_hierarchy.dot
   `- group base_simple3
        cnba: number of accessible attributes (inherited + local)
          avg: 0.0
-         max: Object (0)
+         max: C (2)
          min: Object (0)
-         std: 0.0
-         sum: 0
+         std: 0.845
+         sum: 3
        cnbna: number of accessible nullable attributes (inherited + local) -- nothing
          sum: 0
 
@@ -659,10 +659,10 @@ generating out/nitmetrics_args1.write/module_hierarchy.dot
  ## global metrics
        cnba: number of accessible attributes (inherited + local)
          avg: 0.0
-         max: Object (0)
+         max: C (2)
          min: Object (0)
-         std: 0.0
-         sum: 0
+         std: 0.791
+         sum: 3
        cnbna: number of accessible nullable attributes (inherited + local) -- nothing
          sum: 0
 --- Sends on Nullable Receiver ---
index c789f91..ce6ae7a 100644 (file)
@@ -1 +1 @@
-Runtime error: Uninitialized attribute @a (alt/rterror_attr_def_alt2.nit:24)
+Runtime error: Uninitialized attribute _a (alt/rterror_attr_def_alt2.nit:24)
index 4c1d495..d324a76 100644 (file)
@@ -1,2 +1,2 @@
-Runtime error: Uninitialized attribute @a (alt/rterror_attr_def_alt7.nit:24)
+Runtime error: Uninitialized attribute _a (alt/rterror_attr_def_alt7.nit:24)
 c
index 843263b..2bff123 100644 (file)
@@ -1,2 +1,2 @@
-test_variance_attr.nit:28,21--32: Redef Error: Wrong static type. found nullable Int, expected nullable Object.
-test_variance_attr.nit:29,21--30: Redef Error: Wrong static type. found nullable B, expected nullable A.
+test_variance_attr.nit:28,20--31: Redef Error: Wrong type for parameter `foo'. found nullable Int, expected nullable Object.
+test_variance_attr.nit:29,20--29: Redef Error: Wrong type for parameter `bar'. found nullable B, expected nullable A.
index 6ccd4be..a171b58 100644 (file)
@@ -20,9 +20,9 @@
 # contributed by Jean Privat
 
 class TreeNode
-    var _left: nullable TreeNode
-    var _right: nullable TreeNode
-    var _item: Int
+    var left: nullable TreeNode
+    var right: nullable TreeNode
+    var item: Int
 
 
     init(left: nullable TreeNode, right: nullable TreeNode, item: Int)
index b25b637..cb33878 100644 (file)
@@ -24,7 +24,7 @@ redef class Object
 end
 
 class Toto
-       var _a: Int
+       var a: Int
        redef fun output
        do
                printn(_a)
@@ -47,7 +47,7 @@ class Toto
 end
 
 class Test
-       var _t: Toto
+       var t: Toto
 
        init
        do
index 4d1951f..844ffee 100644 (file)
@@ -15,8 +15,8 @@
 # limitations under the License.
 
 class A
-       var _attribute: nullable A
-       var _num: Char
+       var attribute: nullable A
+       var num: Char
 
        fun foo=(a: nullable A)
        do
index 698ad20..0d15f98 100644 (file)
@@ -16,7 +16,7 @@
 
 
 class Toto[E]
-   var _item: E
+   var item: E
    fun set(e: E)
       do _item = e end
    fun get: E
index cbf28d8..d88deb2 100644 (file)
@@ -49,7 +49,7 @@ class Matrice
        end
 
 private
-       var _tab: Array[Array[Int]] # An array of array to store items
+       var tab: Array[Array[Int]] # An array of array to store items
 
 
        init
index f567201..dc98ae0 100644 (file)
@@ -33,8 +33,8 @@ class Pair[F, S]
                        return "{first}:{_second}"
                end
 private
-       var _first: F
-       var _second: S
+       var first: F
+       var second: S
 
        init(f: F, s: S)
                do
index 6717b8c..7a81644 100644 (file)
@@ -15,9 +15,9 @@
 # limitations under the License.
 
 class A
-    var _foo: nullable Object
-    var _bar: nullable A
-    var _baz: nullable Int
+    var foo: nullable Object
+    var bar: nullable A
+    var baz: nullable Int
     redef fun output do 'A'.output end
 
     init do end
@@ -25,8 +25,8 @@ end
 
 class B
        super A
-    redef var _foo: nullable Int
-    redef var _bar: nullable B
+    redef var foo: nullable Int
+    redef var bar: nullable B
     redef fun output do 'B'.output end
 
     init do end
@@ -36,42 +36,42 @@ var a = new A
 var b = new B
 var ab: A = b
 
-a._foo = a
-a._foo.output
-a._foo = b
-a._foo.output
-a._foo = 1
-a._foo.output
-a._bar = a
-a._bar.output
-a._bar = b
-a._bar.output
-a._baz = 1
-a._baz.output
+a.foo = a
+a.foo.output
+a.foo = b
+a.foo.output
+a.foo = 1
+a.foo.output
+a.bar = a
+a.bar.output
+a.bar = b
+a.bar.output
+a.baz = 1
+a.baz.output
 
-#ab._foo = a
-#ab._foo.output
-#ab._foo = b
-#ab._foo.output
-ab._foo = 1
-ab._foo.output
-#ab._bar = a 
-#ab._bar.output
-ab._bar = b
-ab._bar.output
-ab._baz = 1
-ab._baz.output
+#ab.foo = a
+#ab.foo.output
+#ab.foo = b
+#ab.foo.output
+ab.foo = 1
+ab.foo.output
+#ab.bar = a 
+#ab.bar.output
+ab.bar = b
+ab.bar.output
+ab.baz = 1
+ab.baz.output
 
-#b._foo = a
-#b._foo.output
-#b._foo = b
-#b._foo.output
-b._foo = 1
-b._foo.output
-#b._bar = a
-#b._bar.output
-b._bar = b
-b._bar.output
-b._baz = 1
-b._baz.output
+#b.foo = a
+#b.foo.output
+#b.foo = b
+#b.foo.output
+b.foo = 1
+b.foo.output
+#b.bar = a
+#b.bar.output
+b.bar = b
+b.bar.output
+b.baz = 1
+b.baz.output