Hi,
I have filed issue 10912 (built-in copy routine fails for expanded types)
during beta release of ISE 5.7. I had no response for the issue, but the
problem is still there in ISE 5.7 (i386 Linux in my case):
Maybe I'm using the language wrong, but I can't see it. Here's my
description
and analysis of the problem:
---
feature "frozen twin" of classs DIGITS fails at "Result.copy(Current)":
value of Current not copied to Result.
Accordingly, "is_equal: Result.is_equal (Current)" fails.
Inside copy, the line "{ISE_RUNTIME}.c_standard_copy ($other, $Current)"
seems
to fail to copy `other' to `Current'.
Basically that's C code "ecopy".
The code is in studio/spec/linux-x86/lib/libwkbench.a (wcopy.o).
Maybe "eif_xcopy" should have been called instead for expanded objects...
---
The root class is this:
---snip
class
EXP_TEST
create
make
feature -- Initialization
make is
-- Creation procedure.
local
d : DIGITS
do
d := 6
end
end -- class EXP_TEST
---snip
Class DIGITS follows:
---snip
expanded class
DIGITS
inherit ANY
create
default_create,
make_from_integer
convert
make_from_integer({INTEGER})
feature -- Creation
make_from_integer(i : INTEGER) is
-- convert from `i'
require
valid_digit: i >= 1 and i <= 9
do
set_digit(i)
end -- make_from_integer
feature -- Access
item : BIT 9
has_digit(digit : INTEGER) : BOOLEAN is
-- is bit `digit' set?
require
valid_digit: digit >= 1 and digit <= 9
do
Result := item.item(digit)
end -- has_digit
set_digit(digit : INTEGER) is
-- set `item' to `value'
require
valid_digit: digit >= 1 and digit <= 9
do
item.put(true, digit)
ensure
digit_set: has_digit(digit)
end -- set_item
end -- class DIGITS
---snip
Project definitions:
----snip
<?xml version="1.0" encoding="ISO-8859-1"?><system
xmlns="http://www.eiffel.com/developers/xml/configuration-1-0-0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.eiffel.com/developers/xml/configuration-1-0-0
http://www.eiffel.com/developers/xml/configuration-1-0-0.xsd"
name="exptest" uuid="0DD832E6-42FE-4607-B7C5-A07D9183E7DE">
<target name="exptest">
<root class="EXP_TEST" feature="make"/>
<option warning="true">
<assertions precondition="true"
postcondition="true" check="true" invariant="true" loop="true"/>
</option>
<library name="base"
location="$ISE_LIBRARY\library\base\base.ecf"/>
<cluster name="root_cluster"
location="\home\windl\Projects\Eiffel\ISE57\exptest\"/>
</target>
</system>
----snip
As I need that feature in a larger project, some help wopuld be
appreciated!
Regards,
Ulrich
P.S. The bug report has the same or similar code attached as ZIP file.


|