[fpc-devel] [patch] removing compiler warning from aasmtia.pas unit

Graeme Geldenhuys graemeg.lists at gmail.com
Mon Oct 25 00:40:06 CEST 2010


Hi,

http://mantis.freepascal.org/view.php?id=17709

Constructor is "tried" to be made private - this is not possible.

There is comments in the code about why the visibility of the
constructor is private. But that is pointless, because you can't lower
visibility of a constructor or any other class method, you can only
raise visibility.

If the constructor is really such an issue, then an exception needs to
be raised in it, and NewInstance() used to create such a class
instance or something. Anyway, there are a few ways this can be done,
but all the solutions I know are not very pretty (not pascal like if
you will). For now the patch simply removes the warning.

Original change to private was made by Pierre somebody in r15784.
------------------------
Author: pierre <pierre@******>
Date:   Wed Aug 11 21:45:55 2010 +0000

     * commit 15780 reverted

    git-svn-id: http://svn.freepascal.org:/svn/fpc/trunk@15784
3ad0048d-3df7-0310-abae-a5850022a9f2
------------------------

-- 
Regards,
  - Graeme -


_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net:8080/fpgui/



More information about the fpc-devel mailing list