View Issue Details

IDProjectCategoryView StatusLast Update
0032487FPCDocumentationpublic2018-01-15 12:12
ReporterLacaKAssigned ToMichael Van Canneyt 
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionfixed 
Product VersionProduct Build 
Target Version3.2.0Fixed in Version3.1.1 
Summary0032487: Operator overloading for extended records
DescriptionThere is chapter about extended records:
Chapter 9 Extended records: https://www.freepascal.org/docs-html/ref/refch9.html#x117-1390009
But does not mention, that Operator overloading is supported.

There is mentioned it in another chapter about generics:
8.9 Operator overloading and generics
 
Type
  TComplex = record
     Re,Im : Double;
     class operator +(a,b : TComplex) : TComplex;
  end;
 
class operator TComplex.+ (a,b : TComplex) : TComplex;
begin
  Result.re:=A.re+B.re;
  Result.im:=A.im+B.im;
end;

Probably it will be usefull have info also in Extended records chapter.
Additional InformationI do not know if FPC supports also Delphi syntax for class operator overloading:
http://docwiki.embarcadero.com/RADStudio/Tokyo/en/Operator_Overloading_(Delphi)

If yes then it will ge good have it also in chapter 6 Classes
TagsNo tags attached.
Fixed in Revision1460
FPCOldBugId0
FPCTarget
Attached Files

Activities

Michael Van Canneyt

2018-01-15 11:15

administrator   ~0105842

Indeed, an oversight. Documented, thanks for reporting!

Issue History

Date Modified Username Field Change
2017-09-29 09:04 LacaK New Issue
2017-09-29 09:04 LacaK Status new => assigned
2017-09-29 09:04 LacaK Assigned To => Michael Van Canneyt
2018-01-15 11:15 Michael Van Canneyt Fixed in Revision => 1460
2018-01-15 11:15 Michael Van Canneyt Note Added: 0105842
2018-01-15 11:15 Michael Van Canneyt Status assigned => resolved
2018-01-15 11:15 Michael Van Canneyt Fixed in Version => 3.1.1
2018-01-15 11:15 Michael Van Canneyt Resolution open => fixed
2018-01-15 11:15 Michael Van Canneyt Target Version => 3.2.0
2018-01-15 12:12 LacaK Status resolved => closed