PR# 16741 expanded generic class works for variable type but not as return type
Problem Report Summary
Submitter: soapy2357
Category: Compiler
Priority: Low
Date: 2010/05/05
Class: Bug
Severity: Serious
Number: 16741
Release: 6.4, 6.5, 6.6
Confidential: No
Status: Suspended
Responsible:
Environment: Win Vista, MVS 2008, ES 6.6
Synopsis: expanded generic class works for variable type but not as return type
Description
I would expect the code provided below to either work in both cases or not at all. It's kind of weird that it works only in one case.
To Reproduce
expanded class
FOO [ G ]
end
class
APPLICATION
create
make
feature {NONE} -- Initialization
make
local
t: FOO [FOO [INTEGER]] -- works
do
end
doesnt_work: FOO [FOO [INTEGER]] -- doesn't work: Cycle in expanded client relation
end
Problem Report Interactions
This is expected as the current compiler behaves like ETL3. The new standard is more flexible about that I believe, but our compiler does not handle this because we are trying to optimize expanded types and when used as an attribute it prevents that optimization.