From: Jean Privat Date: Wed, 27 Mar 2013 07:36:28 +0000 (-0400) Subject: lib: remove REQUIRE on pipeline::sort_with X-Git-Tag: v0.6~61 X-Git-Url: http://nitlanguage.org lib: remove REQUIRE on pipeline::sort_with The AbstractSorter does all the job. Signed-off-by: Jean Privat --- diff --git a/lib/pipeline.nit b/lib/pipeline.nit index b95220b..35e26c3 100644 --- a/lib/pipeline.nit +++ b/lib/pipeline.nit @@ -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