Incorrect code generating when accessing static field via property
Original Reporter info from Mantis: merlin2100
-
Reporter name: Merlin Green
Original Reporter info from Mantis: merlin2100
- Reporter name: Merlin Green
Description:
The following code demonstrate the error:
{$static on}
type TMyClass = class
MyStaticVar:Integer; static;
property statProp:Integer read MyStaticVar;
end;
var c:TMyClass;
begin
TMyClass.MyStaticVar := 123;
c := TMyClass.Create;
writeln(c.MyStaticVar); // correctly prints 123
writeln(c.statProp); // ERROR: prints 1085283328 ?!?
end.
Mantis conversion info:
- Mantis ID: 16080
- Version: 2.4.0
- Fixed in version: 2.6.0
- Fixed in revision: 14585 (#3ed4c585)