View Issue Details

IDProjectCategoryView StatusLast Update
0035818FPCDocumentationpublic2019-07-10 10:26
ReporterAkira1364Assigned ToMichael Van Canneyt 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Platformx86_64OSWindowsOS Version10
Product Version3.3.1Product BuildTrunk 
Target VersionFixed in Version3.3.1 
Summary0035818: [PATCH] Minor correction for the Programmer's Guide section on {$VARPROPSETTER}
DescriptionCurrently, the documentation states that VARPROPSETTER enables the use of "var/out/const" parameters. However, const parameters are in fact allowed in setters at all times, regardless of whether any directive is active. What VARPROPSETTER actually enables is var/out/constref parameters.

The patch also makes it clearer that this directive affects all possible places a property can appear, not just those associated with classes and interfaces.
Steps To ReproduceN/A
TagsNo tags attached.
Fixed in Revision1632
FPCOldBugId
FPCTarget3.2.0
Attached Files
  • prog.tex.patch (1,174 bytes)
    Index: prog.tex
    ===================================================================
    --- prog.tex	(revision 1631)
    +++ prog.tex	(working copy)
    @@ -2471,14 +2471,14 @@
     Note that this switch does not propagate to other units, i.e. it's scope
     is limited to the current unit.
     
    -\subsection{\var{\protect\$VARPROPSETTER} : Enable use of var/out/const
    +\subsection{\var{\protect\$VARPROPSETTER} : Enable use of var/out/constref
     parameters for property setters.}
     This boolean directive is meant to import COM interfaces. Sometimes COM
     interfaces have property setters which accept arguments that are not by
     value, but by reference. These setters are normally forbidden. This flag
    -enables the use of property setters with \var{var}, \var{const}, \var{out}
    -arguments. By default it is OFF. The effect is on interface declarations,
    -but also on class definitions.
    +enables the use of property setters with \var{var}, \var{constref}, \var{out}
    +arguments. By default it is OFF. Note that it affects all properties that 
    +write to a setter procedure, including those of objects and extended records.
     
     The following example only compiles in the ON state:
     \begin{verbatim}
    
    prog.tex.patch (1,174 bytes)

Activities

Akira1364

2019-07-10 01:24

reporter  

prog.tex.patch (1,174 bytes)
Index: prog.tex
===================================================================
--- prog.tex	(revision 1631)
+++ prog.tex	(working copy)
@@ -2471,14 +2471,14 @@
 Note that this switch does not propagate to other units, i.e. it's scope
 is limited to the current unit.
 
-\subsection{\var{\protect\$VARPROPSETTER} : Enable use of var/out/const
+\subsection{\var{\protect\$VARPROPSETTER} : Enable use of var/out/constref
 parameters for property setters.}
 This boolean directive is meant to import COM interfaces. Sometimes COM
 interfaces have property setters which accept arguments that are not by
 value, but by reference. These setters are normally forbidden. This flag
-enables the use of property setters with \var{var}, \var{const}, \var{out}
-arguments. By default it is OFF. The effect is on interface declarations,
-but also on class definitions.
+enables the use of property setters with \var{var}, \var{constref}, \var{out}
+arguments. By default it is OFF. Note that it affects all properties that 
+write to a setter procedure, including those of objects and extended records.
 
 The following example only compiles in the ON state:
 \begin{verbatim}
prog.tex.patch (1,174 bytes)

Michael Van Canneyt

2019-07-10 10:26

administrator   ~0117133

Checked and applied, thank you!

Issue History

Date Modified Username Field Change
2019-07-10 01:24 Akira1364 New Issue
2019-07-10 01:24 Akira1364 Status new => assigned
2019-07-10 01:24 Akira1364 Assigned To => Michael Van Canneyt
2019-07-10 01:24 Akira1364 File Added: prog.tex.patch
2019-07-10 10:26 Michael Van Canneyt Status assigned => resolved
2019-07-10 10:26 Michael Van Canneyt Resolution open => fixed
2019-07-10 10:26 Michael Van Canneyt Fixed in Revision => 1632
2019-07-10 10:26 Michael Van Canneyt FPCTarget => -
2019-07-10 10:26 Michael Van Canneyt Note Added: 0117133
2019-07-10 10:26 Michael Van Canneyt Fixed in Version => 3.3.1
2019-07-10 10:26 Michael Van Canneyt Description Updated View Revisions
2019-07-10 10:26 Michael Van Canneyt FPCTarget - => 3.2.0