From f849cbc5bba1b0c86e5bd125d9b4577e2eb51247 Mon Sep 17 00:00:00 2001 From: Lucas Bajolet Date: Tue, 17 Nov 2015 16:05:43 -0500 Subject: [PATCH] lib/core: Allow comparison operators to work on any subclass of FlatText Signed-off-by: Lucas Bajolet --- lib/core/text/flat.nit | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/core/text/flat.nit b/lib/core/text/flat.nit index cd8523c..4d35126 100644 --- a/lib/core/text/flat.nit +++ b/lib/core/text/flat.nit @@ -412,7 +412,7 @@ class FlatString redef fun ==(other) do - if not other isa FlatString then return super + if not other isa FlatText then return super if self.object_id == other.object_id then return true @@ -421,7 +421,7 @@ class FlatString if other._bytelen != my_length then return false var my_index = _first_byte - var its_index = other._first_byte + var its_index = other.first_byte var last_iteration = my_index + my_length @@ -439,7 +439,7 @@ class FlatString redef fun <(other) do - if not other isa FlatString then return super + if not other isa FlatText then return super if self.object_id == other.object_id then return false -- 1.7.9.5