From: Colin A. <col...@go...> - 2008-04-11 09:41:38
|
I will deal with this next weekend, as I only have a laptop this weekend. Also Unicode 5.1 has been released a week ago, so I will prepare an update for that too. On 10/04/2008, Eric Bezault <er...@go...> wrote: > Gelint reports the following errors: > > [VUAR-2] class XM_XPATH_ARRAY_LIST_ITERATOR (33,25): the 1-th actual > argument (of type 'NONE') does not conform to the corresponding formal > argument (of type 'G') of feature `has' in class DS_ARRAYED_LIST. > ---- > [VUAR-2] class XM_XPATH_ARRAY_LIST_ITERATOR (46,25): the 1-th actual > argument (of type 'NONE') does not conform to the corresponding formal > argument (of type 'G') of feature `has' in class DS_ARRAYED_LIST. > ---- > [VUAR-2] class XM_XPATH_ARRAY_LIST_ITERATOR (205,21): the 1-th actual > argument (of type 'NONE') does not conform to the corresponding formal > argument (of type 'G') of feature `has' in class DS_ARRAYED_LIST. > ---- > [VUAR-2] class XM_XPATH_REVERSE_ARRAY_LIST_ITERATOR (33,25): the 1-th > actual argument (of type 'NONE') does not conform to the corresponding > formal argument (of type 'G') of feature `has' in class DS_ARRAYED_LIST. > ---- > [VUAR-2] class XM_XPATH_REVERSE_ARRAY_LIST_ITERATOR (46,25): the 1-th > actual argument (of type 'NONE') does not conform to the corresponding > formal argument (of type 'G') of feature `has' in class DS_ARRAYED_LIST. > ---- > [VUAR-2] class XM_XPATH_REVERSE_ARRAY_LIST_ITERATOR (174,21): the 1-th > actual argument (of type 'NONE') does not conform to the corresponding > formal argument (of type 'G') of feature `has' in class DS_ARRAYED_LIST. > ---- > > One way to solve this problem is to use inline agents ;-))) > Anyway, the assertions are obviously wrong, it should be: > > no_void_item: not a_list.has (Void) > ^^^ > Probably not caught earlier because of the bug in gexace. > > OK, I can feel the fact that you don't want to use inline > agents. So, there are several other solutions. > > 1) Add a routine `has_default' in class DS_SEARCHABLE. > > 2) Add a routine `default_item: G' in your class and > call: not a_list.has (default_item). But this will > not be practical for assertions in creation routines. > > 3) Use KL_ANY_ROUTINES.same_objects: > not a_list.there_exists (agent ANY_.same_objects (?, Void)) > > Solution 3 is the one which will work without any additional > code. > > PS: I would tend to avoid declaring the generic parameter > as 'reference G' because it is not part of ECMA Eiffel is > I remember correctly. > > -- > Eric Bezault > mailto:er...@go... > http://www.gobosoft.com > > ------------------------------------------------------------------------- > This SF.net email is sponsored by the 2008 JavaOne(SM) Conference > Don't miss this year's exciting event. There's still time to save $100. > Use priority code J8TL2D2. > http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone > _______________________________________________ > gobo-eiffel-develop mailing list > gob...@li... > https://lists.sourceforge.net/lists/listinfo/gobo-eiffel-develop > |