"Error: Pointer to object expected" in Advanced Record
Original Reporter info from Mantis: creaothceann
-
Reporter name:
Original Reporter info from Mantis: creaothceann
- Reporter name:
Description:
http://forum.lazarus.freepascal.org/index.php/topic,31423.0.html
Trying to read a class property declared in an advanced record results in the message "Error: Pointer to object expected".
Steps to reproduce:
- create a new program (in {$mode objfpc})
- turn on {$MODESWITCH AdvancedRecords}
- create a record with a class variable, a function and a property (that reads the variable)
- in the function, return the property
Additional information:
The error disappears when the record name is specified before the property name, or when "record" is replaced with "class" (I'd like to avoid classes in this case though).