lib/standard: remove 3 useless types in local variables
authorJean Privat <jean@pryen.org>
Thu, 27 Nov 2014 20:31:25 +0000 (15:31 -0500)
committerJean Privat <jean@pryen.org>
Fri, 28 Nov 2014 01:04:35 +0000 (20:04 -0500)
Signed-off-by: Jean Privat <jean@pryen.org>

lib/opts.nit
lib/standard/ropes.nit
lib/standard/string.nit

index 5e36142..5a226b9 100644 (file)
@@ -354,7 +354,7 @@ class OptionContext
 
        fun get_errors: Array[String]
        do
-               var errors: Array[String] = new Array[String]
+               var errors = new Array[String]
                errors.add_all(errors)
                for o in options do
                        for e in o.errors do
index ad09beb..12ad67e 100644 (file)
@@ -626,7 +626,7 @@ private class ReverseRopeSubstrings
 
        redef fun next do
                if pos < 0 then return
-               var curr: nullable RopeIterPiece = iter.prev
+               var curr = iter.prev
                var currit = curr.node
                while curr != null do
                        currit = curr.node
@@ -753,7 +753,7 @@ private class RopeSubstrings
                pos += str.length
                if pos > max then return
                var it = iter.prev
-               var rnod: String = it.node
+               var rnod = it.node
                loop
                        if not rnod isa Concat then
                                it.ldone = true
index 26251ce..558d9eb 100644 (file)
@@ -1418,7 +1418,7 @@ abstract class Buffer
                if length == 0 then return
                var c = self[0].to_upper
                self[0] = c
-               var prev: Char = c
+               var prev = c
                for i in [1 .. length[ do
                        prev = c
                        c = self[i]