lib: remove some explicit Object bounds
authorJean Privat <jean@pryen.org>
Thu, 11 Jun 2009 15:42:15 +0000 (11:42 -0400)
committerJean Privat <jean@pryen.org>
Tue, 16 Jun 2009 14:57:55 +0000 (10:57 -0400)
The default bound for generic formal parameter is already 'Object'.
And soon the default bound will be 'nullable Object'.

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

lib/standard/abstract_collection.nit
lib/standard/hash.nit
tests/test_refinement.nit

index 8f0a11d..cea7a6c 100644 (file)
@@ -67,7 +67,7 @@ end
 
 # Naive implementation of collections method
 # You only have to define iterator!
-interface NaiveCollection[E: Object]
+interface NaiveCollection[E]
 special Collection[E]
        redef meth is_empty do return length == 0
 
index af4ebd3..6f3ef42 100644 (file)
@@ -61,7 +61,7 @@ redef class Bool
 end
 
 # A HashCollection is an array of HashNode[K] indexed by the K hash value
-private class HashCollection[K: Object, N: HashNode[K], E: Object]
+private class HashCollection[K: Object, N: HashNode[K], E]
 special Collection[E]
 special ArrayCapable[N]
        attr _array: NativeArray[N] = null # Used to store items
index ad05e55..5eea7e6 100644 (file)
@@ -42,7 +42,7 @@ redef class Int
        end
 end
 
-redef class Array[F: Object]
+redef class Array[F]
     redef meth add(item: F)
        do
            self[length] = item