Specialized descendant class does not treat inherited member as specialized type
Original Reporter info from Mantis: PeterJanRoes
-
Reporter name: Peter-Jan Roes
Original Reporter info from Mantis: PeterJanRoes
- Reporter name: Peter-Jan Roes
Description:
When a generic class TCollection&LtPos;E: class> has members of type E and a generic descendant class TDescendantCollection&LtPos;E: TDescendant> specializes the base class using a more specific type parameter, then the implementation of TDescendantCollection&LtPos;E: TDescendant> is not able to access the members of TDescendant and the compiler emits the error "identifier idents no member: X".
It seems like E is treated as TObject instead of TDescendant.
Steps to reproduce:
I have attached a test project which demonstrates the issue by trying to call GetValue() on an inherited member while accessing that member using the following methods:
* a member variable
* a property
* a member function
* an index property
* a default index property
Mantis conversion info:
- Mantis ID: 25043
- Fixed in version: 3.0.0
- Fixed in revision: 27861 (#639a59df)
- Monitored by: » PeterJanRoes (Peter-Jan Roes)