[fpc-devel] Problem with nested classes and const struct values

Andrew Brunner andrew.t.brunner at gmail.com
Tue May 1 06:36:14 CEST 2012


Yes.  I'm completely sure it's working now.  But i can't figure out why the
small project doesn't.  I even tried to make clean for my big project to
see if I could make it not work.. but it compiles now.

On Mon, Apr 30, 2012 at 11:23 PM, Flávio Etrusco
<flavio.etrusco at gmail.com>wrote:

> FWIW FPC 2.6.0 also triggers the same error. AFAICS this problem is
> somewhat analogous to the limitation when declaring members in a
> record. Are you sure the unit in your big project is being compiled?
>
> -Flávio
>
> On Mon, Apr 30, 2012 at 3:39 PM, Andrew Brunner
> <andrew.t.brunner at gmail.com> wrote:
> > Well,
> >
> > The problem started when I did a fresh install of Ubuntu 12.04.
> > The main project that uses similar code to my attached test had FPC raise
> > the same error but with similar code.
> > Presently, a fresh build of FPC and Lazarus allows me to build my big
> > project however, the test project still won't build with
> >
> > Compiling ./Test.lpr
> > Test.lpr(65,36) Error: Incompatible types: got "Pointer" expected
> "PCLSInfo"
> > Test.lpr(65,44) Error: Illegal expression
> > Test.lpr(66,36) Error: Incompatible types: got "Pointer" expected
> "PACLInfo"
> > Test.lpr(66,44) Error: Illegal expression
> > Test.lpr(73) Fatal: There were 4 errors compiling module, stopping
> > Fatal: Compilation aborted
> >
> > But yet my big project with very complex nested declarations compiles
> just
> > fine
> > <snip>
> > unit coAdmin;
> >
> > interface
> >   uses hTimer,hHTTP,hHTTPd,hRSR,uRSR,Classes,uCoreObjects,uKeywords,
> >
> hSRConsts,uTimer,uStringArray,uVarString,uKPList,hDateUtils,uFileUtils,
> >
> >
> dbmDomains,dbmCoreObjects,dbmUserAccounts,dbmRSS,dbmCalendaring,hDatabase;
> >
> > Type
> >   ns=class
> >   Type
> >     Admin=class
> >     const
> >       XMLInf:TXMLInfo=(
> >         Enabled                  : false;
> >       );
> >       ACLInf:TACLInfo=(
> >         Name                     : 'Admin';
> >         NameSpace                : '/core/admin';
> >         Caption                  : 'Administration Core Object';
> >         Prompt                   : 'User can access administration
> > dashboard';
> >         Description              : 'Back-end system administration
> handler'
> >       );
> >       CLSInf:TCLSInfo=(
> >         Name                     : 'TAdminCore';
> >         Location                 : 'coAdmin.pas';
> >       );
> >       Header:TCoreObjectInfo=(
> >         ID                       : 0;
> >         ProviderID               : 0;
> >         Enabled                  : true;
> >         Anonymous                : false;
> >         NotifyOnBuffersChanged   : false;
> >         Scale                    : 0;
> >         CLSInfo                  : @CLSInf;
> >         ACLInfo                  : @ACLInf;
> >       );
> >     <snip of more of these types of declarations>
> >
> >
> > On Mon, Apr 30, 2012 at 1:12 PM, Jonas Maebe <jonas.maebe at elis.ugent.be>
> > wrote:
> >>
> >>
> >> On 30 Apr 2012, at 16:48, Andrew Brunner wrote:
> >>
> >> > This problem did not exist a few days ago.
> >>
> >> Can you be more precise? I just checked with trunk from before the
> >> jvmbackend merge (which is from Thursday), and that one also gives an
> error.
> >>
> >>
> >> Jonas_______________________________________________
> >> fpc-devel maillist  -  fpc-devel at lists.freepascal.org
> >> http://lists.freepascal.org/mailman/listinfo/fpc-devel
> >
> >
> >
> > _______________________________________________
> > fpc-devel maillist  -  fpc-devel at lists.freepascal.org
> > http://lists.freepascal.org/mailman/listinfo/fpc-devel
> >
> _______________________________________________
> fpc-devel maillist  -  fpc-devel at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20120430/718ebadd/attachment.html>


More information about the fpc-devel mailing list