View Issue Details

IDProjectCategoryView StatusLast Update
0036084FPCDocumentationpublic2019-09-20 07:06
ReporterLacaKAssigned ToMichael Van Canneyt 
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionfixed 
Product Version3.0.4Product Build 
Target VersionFixed in Version3.3.1 
Summary0036084: Internal compiler procedures like Inc() and Dec() cannot be overloaded
DescriptionPlease document it somewhere.
I do not know exact rules, but probably also other compiler procedures fall in this rule.
There is documentation about function overloading: where is mentioned Dec() procedure as an example.

If user defines own set of Dec() Inc() procedures these cannot be used together with "System" Inc() and Dec() (only if explicitly prefixed by unit name System.Inc(), System.Dec())

So if user defines in own unit:
  Dec(Var I : Longint;decrement : Longint); // with or without "overload" directive
Calling system Dec with 1 parameter:
is no more allowed.
(only if explicitly specified as System.Dec(i);)

And system Inc and Dec cannot be specified using "overload" directive (AFAIU)
TagsNo tags attached.
Fixed in Revision1655
Attached Files


Michael Van Canneyt

2019-09-19 23:41

administrator   ~0118127

Clarified, changed example to some other function.

Issue History

Date Modified Username Field Change
2019-09-18 19:57 LacaK New Issue
2019-09-18 19:57 LacaK Status new => assigned
2019-09-18 19:57 LacaK Assigned To => Michael Van Canneyt
2019-09-18 20:01 LacaK Description Updated View Revisions
2019-09-18 20:01 LacaK FPCTarget => -
2019-09-19 23:41 Michael Van Canneyt Status assigned => resolved
2019-09-19 23:41 Michael Van Canneyt Resolution open => fixed
2019-09-19 23:41 Michael Van Canneyt Fixed in Version => 3.3.1
2019-09-19 23:41 Michael Van Canneyt Fixed in Revision => 1655
2019-09-19 23:41 Michael Van Canneyt FPCTarget - => 3.2.0
2019-09-19 23:41 Michael Van Canneyt Note Added: 0118127
2019-09-20 07:06 LacaK Status resolved => closed