Advanced records don't support variant record part
Original Reporter info from Mantis: bertikrueger
-
Reporter name:
Original Reporter info from Mantis: bertikrueger
- Reporter name:
Description:
In Delphi it is possible to have advanced records with variant record parts, which is at the moment not possible in Free Pascal:
type
TVector3 = record
public
// constructor
constructor create(const x: Single; const y: Single; const z: Single);
// overloaded operators
class operator negative(const a : TVector3) : TVector3; inline;
class operator add(const a, b : TVector3) : TVector3; inline;
// methods
function normalize : TVector3; inline;
function length : single; inline;
// variant record part
case Boolean of
TRUE: (x : single;
y : single;
z : single; );
FALSE: (e : array[0..2] of single; );
end;
Mantis conversion info:
- Mantis ID: 20638
- Build: SVN 33000
- Version: 2.5.1
- Fixed in version: 3.0.0
- Fixed in revision: 19605 (#2146d8a8)