Hallo,
hatte jetzt die letzten Tage keine Zeit mich um den Bugreport zu kümmern.
Ich würde jetzt folgendes schreiben:
Titel: inconsistency with compiler and reference about object and record properties in published sections
The reference of free pascal states that published sections are the same as public sections except for the Type Information which is generated. The only exception are array properties, which cannot be used in published sections (
http://www.freepascal.org/docs-html/ref ... 1-810006.1). This is not entirely true, because records and objects (not Classes, see example below) cannot be used either.
The chapter about properties only mentions that it is irrelevant if you use public or published sections (
http://www.freepascal.org/docs-html/ref ... 940006.5.1) which is probably referring to syntax when declaring them but which is not very clear from the formulation. It is however inconsistent to the statement in the previously mentioned chapter and to what the compiler allows you to do.
If you take a look at the example code below you see that regarding to the information above this code should compile but it doesn't.
Code: Alles auswählen
program Project1;
uses
Classes;
type
TSampleObject = object
x,y,z: Single;
end;
TSampleRecord = record
x,y,z: Single;
end;
{ TSampleClass }
TSampleClass = class( TPersistent )
private
FVec1: TSampleObject;
FVec2: TSampleObject;
FVec3: TSampleRecord;
FVec4: TSampleRecord;
public
property Vec1: TSampleObject read FVec1 write FVec1; //This is possible
property Vec3: TSampleRecord read FVec3 write FVec3; //This is possible
published
property Vec2: TSampleObject read FVec2 write FVec2; //This is not possible
property Vec4: TSampleRecord read FVec4 write FVec4; //This is not possible
end;
begin
end.
With the new RTTI-Features (
http://wiki.freepascal.org/User_Changes ... TI_changes) it should at least be possible for records and I see no reason why it should not work with objects.
Wollte nochmal eure Meinung hören bevor ich das abschicke. Insbesondere wegen dem letzten Abschnitt, von dem ich keine Ahnung habe ob das so stimmt

Kann dich auch gerne zitieren da, Socke, aber wusste nicht ob dir das recht ist.