Multi-constraint formal generics: calls on formal generic in watch expressions
Posted May 28th, 2007 by alexk_es
in
Purpose:
Ensure that watch expressions that involve calls to features on entities of multi-constraint formal generic types are handled correctly.
Test procedure:
- Create and compile a system with the following classes:class A [G -> {where
B
rename
f as b_f,
g as h,
out as b_out
end,
C
rename
default_create as c_default_create,
f as c_f,
h as g,
out as c_out
end
} create default_create end
]
feature
f is
do
create item
end
item: G
end
class B
inherit
ANY
redefine
out
end
feature
f, g, out: STRING is
do
Result := "B"
end
end
class C
inherit
ANY
redefine
out
end
feature
f, h, out: STRING is
do
Result := "C"
end
end
class D
inherit
B
rename
f as b_f
select
out
end
C
rename
f as c_f,
out as c_out
end
end
class TEST
create
make
feature
make is
local
a: A [D]
do
create a
a.f
end
endTESTis the root class of the system. - Run the system under debugger and stop in feature
{A}.fafter creation instruction. - Add the following Watch expressions:item.b_out
item.c_out
item.b_f
item.c_f
item.g
item.h - Observe that the output matches the expected result:
B B B C C B
Expected result:
Verify that the output matches the expected result.
- Login or register to post comments
- Add new test run report
Test runs
| ID | Date | Platform | Result |
|---|---|---|---|
| trr#289 | 1 year 12 weeks ago | All platforms | Failed |