lib: remove REQUIRE on pipeline::sort_with
authorJean Privat <jean@pryen.org>
Wed, 27 Mar 2013 07:36:28 +0000 (03:36 -0400)
committerJean Privat <jean@pryen.org>
Thu, 16 May 2013 20:05:33 +0000 (16:05 -0400)
The AbstractSorter does all the job.

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

lib/pipeline.nit

index b95220b..35e26c3 100644 (file)
@@ -42,12 +42,8 @@ redef interface Collection[E]
 
        # Filter: sort with a given `sorter`.
        # Important: require O(n) memory.
-       #
-       # REQUIRE: self isa Iterator[Object]
-       # FIXME: AbstractSorter[E] is refused
-       fun sort_with(sorter: AbstractSorter[Object]): Collection[E]
+       fun sort_with(sorter: AbstractSorter[E]): Collection[E]
        do
-               assert self isa Collection[Object]
                var a = self.to_a
                sorter.sort(a)
                return a