Unable to make typecast to nested type.
Original Reporter info from Mantis: merlin2100
-
Reporter name: Merlin Green
Original Reporter info from Mantis: merlin2100
- Reporter name: Merlin Green
Description:
Compilation of the attached program fails with the following errors:
Incompatible types: got 'Class of InnerClass' expected 'InnerClass'
Syntax error, ";" expected but "(" found
----
program BugDemo;
type
OuterClass = class
public
type InnerClass = class
end;
end;
function Fn(p:Pointer):OuterClass.InnerClass;
begin
Result := OuterClass.InnerClass(p); // Compilation Failed here
end;
begin
end.
Mantis conversion info:
- Mantis ID: 16222
- Build: svn r15108
- Version: 2.5.1
- Fixed in version: 2.6.0
- Fixed in revision: 15122 (#c62c487b)