PR# 12878 Multi-constraint formal generics: calls on formal generic in watch expressions
Problem Report Summary
Submitter: alexk_es
Category: Debugger
Priority: Medium
Date: 2007/05/28
Class: Bug
Severity: Serious
Number: 12878
Release: 6.0.6.8702
Confidential: No
Status: Suspended
Responsible: martins
Environment: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 2.0.50727; .NET CLR 1.1.4322)
Synopsis: Multi-constraint formal generics: calls on formal generic in watch expressions
Description
Watch expressions that involve calls to features on entities of multi-constraint formal generic types result in unknown identifier (VEEN) or internal error.
To Reproduce
1. Create and compile a system with the following classes:
class A [G -> {
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
end
where TEST is the root class of the system.
2. Run the system under debugger and stop in feature {A}.f after creation instruction.
3. Add the following "Watch" expressions:
item.b_out
item.c_out
item.b_f
item.c_f
item.g
item.h
4. Observe that the output does not match the expected result:
B
B
B
C
C
B
Problem Report Interactions
for now let's suspend this issue. I'd like later to see if we can not do any thing more. But I noticed the usual issue between runtime data and compiler data. The runtime's data know the exacte generic derivation, the compiler knows only if this is a "reference".
`item' is of type D and not G (it is not formal). That is why calls to `b_out' for example does NOT work as it does not occur in D. `c_out' however actually occurs as a feature in D. This might have caused some confusion. If you look at the flat view you will see that there is no more renaming visible. While looking at it I found another bug and fixed it in rev#68897. If you agree after double checking we might close this bug?