liberty-eiffel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Liberty-eiffel] inheritance problem


From: José Bollo
Subject: Re: [Liberty-eiffel] inheritance problem
Date: Sat, 7 Feb 2015 07:16:11 +0100

Le Fri, 06 Feb 2015 15:23:26 +0000,
Laurie Moye <address@hidden> a écrit :

> Hi,
> 
> Could someone please could tell me what I'm doing wrong here.
> 
> I have some ancient code with a tangled mess of inheritances. I was
> trying to compile it under liberty-adler, when I got an error message
> like the one below. I've managed to simplify the problem to the
> example attached.
> Yes, "Type A[ANY] is deferred", but type D isn't, and that's the one
> I'm calling. Also, I don't understand why the compiler is quoting a
> line from 'slice' in ARRAY at me.
> 
> Thanks,
>       Laurie
> ************************************************************
> ceres/fails-5: compile -boost -no_gc test -o test.
> ****** Fatal Error: Type A[ANY] is deferred. (Cannot create object.)
> 
> Line 407 column 10 in ARRAY
> (/usr/local/share/liberty-adler/src/lib/storage/collection/array.e):
>          create Result.make(lower, lower + max - min)
>          ^
> ------
> Error occurs while compiling. Compilation process aborted.

hello,

I think that it is a language issue or a library implementation issue.
I would vote for both.

When considering ARRAY, it is ok as make(low,up) is in the creators.
When considering A, it is not ok as A is deferred.
When considering D, it is not ok as D dosn't list make_array in its
creators.

The error message is almost clear. What is strange is that it comes
for class A. It can be explained by the fact that the compiler checks
classes in the order ARRAY, A, D (I guess).

The solution is to make slice returning ARRAY not like Current. It is
in the library.

But I'm curious to know if the language has a solution for such issue.

best regards
josé bollo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]