Impossible to inherit from class declared inside another class (nested types)
Original Reporter info from Mantis: SIV
-
Reporter name: Igor Sudarikov
Original Reporter info from Mantis: SIV
- Reporter name: Igor Sudarikov
Description:
A nice nested types feature was introduced in trunk recently. But there is a bug that in some situations makes it impossible to declare new classes which inherit from a nested class:
type
TClass1 = class
public type
TNestedClass = class
end;
// WORKS
TNestedClass2 = class(TNestedClass)
end;
end;
TClass2 = class(TClass1)
public type
// FAILS (Error: Identifier not found "TNestedClass")
TNestedClass3 = class(TNestedClass)
end;
end;
// FAILS (Fatal: Syntax error, ")" expected but "." found)
TClass3 = class(TClass1.TNestedClass)
end;
begin
end.
Mantis conversion info:
- Mantis ID: 16083
- Build: 15033
- Version: 2.5.1
- Fixed in version: 2.6.0
- Fixed in revision: 15036 (#17688107)